Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET SMTP

 AfterLogic Forum : MailBee.NET SMTP
Subject Topic: Composing MDN messages Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
MaximSchukin
Newbie
Newbie
Avatar

Joined: 01 April 2014
Location: Ukraine
Online Status: Offline
Posts: 1
Posted: 01 April 2014 at 12:33am | IP Logged Quote MaximSchukin

What should i do to generate MDN message according to rfc3798 (see http://tools.ietf.org/html/rfc3798)
using mailbee?
Back to Top View MaximSchukin's Profile Search for other posts by MaximSchukin
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 01 April 2014 at 4:33am | IP Logged Quote Igor

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 View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide