article

How to Create/Format Forward & Reply Email Messages inside .NET Apps

Email
Submitted on: 5/11/2016 8:09:49 AM
By: Sherazam  
Level: Intermediate
User Rating: By 1 Users
Compatibility: C#, VB.NET
Views: 2868
 
     This technical tip explains how .NET developers can Create the Forward & Reply Email Messages inside .NET Applications using Aspose.Email for .NET. Aspose.Email API provides the capability of creating and formatting the forward and reply messages. The ReplyMessageBuilder and ForwardMessageBuilder classes of the API are used to create the Reply and Forward messages respectively. A Reply or Forward message can be specified to be created using any of the modes of OriginalMessageAdditionMode enum.

 
				This technical tip explains how .NET developers can Create the Forward & Reply Email Messages inside .NET Applications using Aspose.Email for .NET. Aspose.Email API provides the capability of creating and formatting the forward and reply messages. The ReplyMessageBuilder and ForwardMessageBuilder classes of the API are used to create the Reply and Forward messages respectively. A Reply or Forward message can be specified to be created using any of the modes of OriginalMessageAdditionMode enum. 
// Creating Reply Message
//[C# Code Sample]
MapiMessage originalMsg = MapiMessage.FromFile("original.msg");
ReplyMessageBuilder builder = new ReplyMessageBuilder();
builder.ReplyAll = true;
builder.AdditionMode = OriginalMessageAdditionMode.Textpart;
builder.ResponseText = "

Dear Friend,

I want to do is introduce my co-author and co-teacher.

This is a first link

This is a second link

"; MapiMessage replyMsg = builder.BuildResponse(originalMsg); replyMsg.Save("reply.msg"); //[VB.NET Code Sample] Dim originalMsg As MapiMessage = MapiMessage.FromFile("original.msg") Dim builder As New ReplyMessageBuilder() builder.ReplyAll = True builder.AdditionMode = OriginalMessageAdditionMode.Textpart builder.ResponseText = "

Dear Friend,

I want to do is introduce my co-author and co-teacher.

This is a first link

This is a second link

" Dim replyMsg As MapiMessage = builder.BuildResponse(originalMsg) replyMsg.Save("reply.msg") //Creating Forward Message //[C# Code Sample] ForwardMessageBuilder builder = new ForwardMessageBuilder(); builder.AdditionMode = OriginalMessageAdditionMode.Textpart; MapiMessage forwardMsg = builder.BuildResponse(originalMsg); forwardMsg.Save("forward.msg"); //[VB.NET Code Sample] Dim builder As New ForwardMessageBuilder() builder.AdditionMode = OriginalMessageAdditionMode.Textpart Dim forwardMsg As MapiMessage = builder.BuildResponse(originalMsg) forwardMsg.Save("forward.msg") Overview: Aspose.Email for .NET Aspose.Email for .NET is a set of components allowing developers to easily implement email functionality within their ASP.NET web applications, web services & Windows applications. It Supports Outlook PST, EML, MSG & MHT formats. It allows developers to work with SMTP, POP3, FTP & MS Exchange servers. It supports mail merge, iCalendar, customized header & body, header information, embedded files, Twitter & many more. It makes it easy to work with HTML or plain text emails & their attachments.


Other 44 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Intermediate category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)
 

To post feedback, first please login.