aspNetEmail

SmtpGreeting Enumeration

The greeting used against the SMTP server

publicĀ enumĀ SmtpGreeting

Remarks

If the EmailMessage Username or XAccounting property is set, this value is overridden to always use 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()
            
            

Members

Member NameDescription
EhloThe EHLO greeting is used
HeloThe HELO greeting is used

Requirements

Namespace: aspNetEmail

Assembly: aspNetEmail (in aspNetEmail.dll)

See Also

aspNetEmail Namespace