aspNetEmail

EmailMessage.SmtpHello Property

The string used to say hello to the connecting mail server for relay. By default the property is the host name of the local computer.

public string SmtpHello {get; set;}

Example

[C#]
		EmailMessage msg = new EmailMessage();
		msg.Server = "Mail1.MyCompany.com";
		msg.FromAddress = "me@MyCompany.com";
		msg.To = "you@YourCompany.com";
		msg.Subject = "Daily Newsletter";
		msg.Body = "Here is our daily newsletter.....";
		msg.SmtpHello = "Workstation1";
		if ( msg.Send() )
		{
			Console.WriteLine( "Message Sent!");
		}
		else
		{
			Console.WriteLine( msg.LastException().Message );
		}
		
[Visual Basic]
		Dim msg As New EmailMessage()
		msg.Server = "Mail1.MyCompany.com"
		msg.FromAddress = "me@MyCompany.com"
		msg.To = "you@YourCompany.com"
		msg.Subject = "Daily Newsletter"
		msg.Body = "Here is our daily newsletter....."
		msg.SmtpHello = "Workstation1"
		If (msg.Send()) Then
		    Console.WriteLine("Message Sent!")
		Else
		    Console.WriteLine(msg.LastException().Message)
		End If
		

See Also

EmailMessage Class | aspNetEmail Namespace