aspNetEmail

EmailMessage.SmtpGreeting Property

Specifieds either EHLO or HELO greeting to the Mail Server.

public SmtpGreeting SmtpGreeting {get; set;}

Remarks

By default, HELO is used. If a Username or XAccounting object is set, the SmtpGreeting will automatically be set to EHLO.

Example

[C#]
            EmailMessage msg = new EmailMessage( "mail.myCompany.com");
            msg.Subject = "Order Confirmation";
            msg.To = "you@yourcompany.com";
            
            msg.From = "me@myCompany.com";
            
            //logging for easier troubleshooting
            msg.Logging = true;
            msg.LogPath = "c:\\email.log";
            
            //set the plain text body
            msg.Body  = "the email body contents go here...";
            
            //force the EHLO greeting
            msg.SmtpGreeting = SmtpGreeting.Ehlo;
            
            
            msg.Send();
            
            
[VB.NET]
            Dim msg As New EmailMessage("mail.myCompany.com")
            
            msg.Subject = "Order Confirmation"
            msg.To = "you@yourcompany.com"
            
            msg.From = "me@myCompany.com"
            
            'logging for easier troubleshooting
            msg.Logging = True
            msg.LogPath = "c:\email.log"
            
            'set the plain text body
            msg.Body = "the email body contents go here..."
            
            'force the EHLO greeting
            msg.SmtpGreeting = SmtpGreeting.Ehlo
            
            
            msg.Send()
            
            

See Also

EmailMessage Class | aspNetEmail Namespace