Example #1
0
        public void Valid_send_sign_DomainKey(string headers)
        {

            var msg = new MailMessage();
            msg.To.Add(new MailAddress(_to, "Jim Bob"));
            msg.From = new MailAddress(_from, "Joe Bloggs");
            msg.Subject = "Test DomainKeys Message";
            msg.Body = "A simple message";


            var domainKeySigner = new DomainKeySigner(PrivateKeySigner.Create(_privateKey), _domain, _selector, GetHeaders(headers));

            msg.DomainKeySign(domainKeySigner);

            var smtp = new SmtpClient();

            smtp.Send(msg);



        }