aspNetEmail

MailFormat Enumeration

An enumeration for setting the mail format of the email.

public enum MailFormat

Members

Member NameDescription
Text Sets the body property of the Email to be text formatted. This is equivalent to setting Content-Type: text/plain
Html Sets the body property of the email to be html formatted. This is equivalent to setting the Content-Type: text/html
[C#]
             EmailMessage msg = new EmailMessage( "mail.myserver.com" );
             msg.FromAddress = "me@aspNetEmail.com";
             msg.To = "you@aspNetEmail.com";
             msg.Subject = "Hi There!";
             msg.BodyFormat = MailFormat.Html;
             msg.Body = "<br>hi!</br>What are you up too?";
             msg.Send();
             
[Visual Basic]
            Dim msg As New EmailMessage("mail.myserver.com")
            msg.FromAddress = "me@aspNetEmail.com"
            msg.To = "you@aspNetEmail.com"
            msg.Subject = "Hi There!"
            msg.BodyFormat = MailFormat.Html
            msg.Body = "<br>hi!</br>What are you up too?"
            msg.Send()
             

Requirements

Namespace: aspNetEmail

Assembly: aspNetEmail (in aspNetEmail.dll)

See Also

aspNetEmail Namespace