aspNetEmail

EmailMessage.Send Method (String, String, String, String, String)

A static/shared method for sending email.

public static bool Send(
   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 textual 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 | EmailMessage.Send Overload List