aspNetEmail

ForwardReplyEmail Class

A helper class for Forwarding and Replying to emails.

For a list of all members of this type, see ForwardReplyEmail Members.

System.Object
   ForwardReplyEmail

public class ForwardReplyEmail

Remarks

This class will take an email, and properly format it, like you would find in an email client, for forwarding or replying. Both the ReplyEmail and ForwardEmail classes inherit from this ForwardReplyEmail class.

Example

[C#]
            //the following example creates an email for forwarding
            ReplyEmail reply = new ReplyEmail();
            
            //load the email message that will be sent a reply
            reply.LoadFile( "c:\\temp\\original.eml" );
            
            //set the body text found inline
            reply.BodyText( "Thanks for the email. Here's the info you requested...");
            
            //render the message
            reply.Render();
            
            //work with the EmailMessage that has been formatted as a reply
            reply.FormattedMessage.Server = "mail.example.com";
            reply.FormattedMessage.FromAddress ="me@example.com";
            reply.FormattedMessage.To = "you@yourcompany.com";
            
            reply.FormattedMessage.Send();
            
            
            
[VB.NET]
             'the following example creates an email for forwarding
            Dim reply As New ReplyEmail()
            
            'load the email message that will be sent a reply
            reply.LoadFile("c:\temp\original.eml")
            
            'set the body text found inline
            reply.BodyText("Thanks for the email. Here's the info you requested...")
            
            'render the message
            reply.Render()
            
            'work with the EmailMessage that has been formatted as a reply
            reply.FormattedMessage.Server = "mail.example.com"
            reply.FormattedMessage.FromAddress = "me@example.com"
            reply.FormattedMessage.To = "you@yourcompany.com"
            
            reply.FormattedMessage.Send()
            
            
            
            
            

Requirements

Namespace: aspNetEmail

Assembly: aspNetEmail (in aspNetEmail.dll)

See Also

ForwardReplyEmail Members | aspNetEmail Namespace