On our web server we are trying to use MailClient.Sent to send a mail
through our mail server, but our mail server doesn't support EHLO. Can
MailClient.Send be configured to use HELO rather than EHLO and if so,
how
Some quick pre-emptive answers, A1) No, getting rid of the McAfee
Webshield SMTP that doesn't support EHLO is not an option. A2) Talking
direct to the mail server on a diferent port than 25 to bypass the
Webshield software is not an option.
Thanks in advance for any help.
Regards
Cameron

Can MailClient.Send use HELO
gruflee
Here's the error page
Command not implemented. The server response was: Command not Supported
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Net.Mail.SmtpException: Command not implemented. The server response was: Command not Supported
Source Error:
Source File: d:\Subscriptions\test.aspx Line: 12
Stack Trace:
gpetrosh
If the server does not support EHLO, we should be trying HELO
Are you saying that we don't do that
Ravi Varma
Helo!
Did a little testing... I cannot find a way to force SmtpClient to use HELO. Yet I found out that if the server responds with 500 (Command not recognized) to EHLO, SmtpClient will try again with HELO. It will not if it gets any other of the errors I tried.
Now, the "Command not Supported" in your stack trace looks like a 502 (Command not implemented), which wouldn't be a legal response to EHLO or HELO under either RFC821 or RFC2821. If you can confirm that the server is indeed sending back a 502, then unfortunately it's the server's fault and I don't think there is anything you can do.
Just for the record, SmtpClient behaviour is "legally" correct... RFC2821 (3.2) states that the client should fall back to HELO if it gets a "Command not recognized" (i.e. 500) to its EHLO. No other options are given. And 502 in response to EHLO is just plain wrong, regardless of what RFC it was written against. Yet, it's sad that SmtpClient isn't flexible enough to re-try with a HELO anyway... not going to choke the network, I presume.
Sorry for the bad news... unless McAfee provides a patch I'm afraid you will have to roll out your own smtp client library, or download one. Or I could just be wrong ;)
HTH
--mc