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

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


            var dkimSigner = new DkimSigner(PrivateKeySigner.Create(_privateKey), _domain, _selector, GetHeaders(headers));

            msg.DkimSign(dkimSigner);

            var smtp = new SmtpClient();

            smtp.Send(msg);



        }