aspNetEmail

ForwardEmail Class

Creates an EmailMessage object that can be forwarded.

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

System.Object
   ForwardReplyEmail
      ForwardEmail

public class ForwardEmail : ForwardReplyEmail

Example

[C#]
            //the following example creates an email for forwarding
            ForwardEmail fe = new ForwardEmail();
            
            //load the email message that will be forwarded
            fe.LoadFile( "c:\\temp\\original.eml" );
            
            //set the body text found inline
            fe.BodyText( "Please see the messsage below...");
            
            //work with the EmailMessage that was created for forwarding
            //this message is formatted just like an email in a mail client
            EmailMessage forwardedMessage = fe.ToEmailMessage();
            forwardedMessage.Server = "mail.example.com";
            forwardedMessage.FromAddress ="me@example.com";
            forwardedMessage.To = "you@yourcompany.com";
            
            forwardedMessage.Send();
            
[VB.NET]
             'the following example creates an email for forwarding
            Dim fe As New ForwardEmail()
            
            'load the email message that will be forwarded
            fe.LoadFile("c:\temp\original.eml")
            
            'set the body text found inline
            fe.BodyText("Please see the messsage below...")
            
            'work with the EmailMessage that was created for forwarding
            'this message is formatted just like an email in a mail client
            Dim forwardedMessage As EmailMessage = fe.ToEmailMessage()
            forwardedMessage.Server = "mail.example.com"
            forwardedMessage.FromAddress = "me@example.com"
            forwardedMessage.To = "you@yourcompany.com"
            
            forwardedMessage.Send()
            
            

Requirements

Namespace: aspNetEmail

Assembly: aspNetEmail (in aspNetEmail.dll)

See Also

ForwardEmail Members | aspNetEmail Namespace