Author |
|
MaximSchukin Newbie
Joined: 01 April 2014 Location: Ukraine
Online Status: Offline Posts: 1
|
Posted: 01 April 2014 at 12:33am | IP Logged
|
|
|
What should i do to generate MDN message according to rfc3798 (see http://tools.ietf.org/html/rfc3798)
using mailbee?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 01 April 2014 at 4:33am | IP Logged
|
|
|
You can use something like that:
Code:
Smtp mailer1 = new Smtp();
mailer1.Log.Enabled = true;
mailer1.Log.Filename = @"C:\Temp\log.txt";
mailer1.Log.Clear();
mailer1.SmtpServers.Add("mail.domain1.com", "user", "pass");
mailer1.From.Email = "from@domain1.com";
mailer1.To.AsString = "to@domain2.com";
mailer1.Subject = "Read: " + "test";
mailer1.BodyPlainText = "Body plain - type whatever you want here";
mailer1.BodyHtmlText = "Body html - type whatever you want here";
mailer1.Message.Headers.Add("In-Reply-To", msg.MessageID, false);
string md = @"Reporting-UA: domain1.com; Your mail client
Final-Recipient: rfc822;from@domain1.com
Original-Message-ID: " + msg.MessageID +
@"
Disposition: manual-action/MDN-sent-manually; displayed";
mailer1.Message.Attachments.Add(Encoding.ASCII.GetBytes(md), string.Empty, null, "message/disposition-notification", null, NewAttachmentOptions.Inline, MailTransferEncoding.Raw7bit);
mailer1.Send(); |
|
|
msg is the message for which the notification is being sent.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|