The greeting used against the SMTP server
If the EmailMessage Username or XAccounting property is set, this value is overridden to always use Ehlo.
[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()
| Member Name | Description |
|---|---|
| Ehlo | The EHLO greeting is used |
| Helo | The HELO greeting is used |
Namespace: aspNetEmail
Assembly: aspNetEmail (in aspNetEmail.dll)