aspNetEmail

EmailMessage.SendHtml Method 

A static/shared method for sending a HTML formatted email.

public static bool SendHtml(
   string fromAddress,
   string toAddress,
   string subject,
   string body,
   string mailServer
);

Parameters

fromAddress
The 'FROM' email address used for sending the email.
toAddress
The email recipient.
subject
The subject of the email.
body
The body text of the email.
mailServer
The relay mail server.

Return Value

True if the send was successful.

Remarks

This method creates a Html email. For a Html formatted email, see SendHtml().

Example

[C#]
string emailBody = CreateNewsletter(); //custom method to create the email body
EmailMessage.Send( "me@mycompany.com", "you@yourcompany.com;him@hiscompany.com", "Daily Newsletter", emailBody, "127.0.0.1" );
			
[Visual Basic]
Dim emailBody As String = CreateNewsletter() 'custom method to create the email body
EmailMessage.Send("me@mycompany.com", "you@yourcompany.com;him@hiscompany.com", "Daily Newsletter", emailBody, "127.0.0.1")
			

See Also

EmailMessage Class | aspNetEmail Namespace