pendragon Posted April 25, 2006 Posted April 25, 2006 Hi All Am trying to send email from a program written in c# VS2005, using the following code. SmtpClient mailClient = new SmtpClient(SMTPServer); mailClient.UseDefaultCredentials = true; MailAddress from = new MailAddress(emailFrom); MailAddress to = new MailAddress(emailTo); MailMessage message = new MailMessage(from, to); message.Subject = emailSubject; message.Body = emailBody; mailClient.Send(message); [/Code] When it tries to send I get the following error System.Net.Mail.SmtpException was unhandled Message="Command not implemented. The server response was: Sorry no ESMTP" Anyone know what this means please? Thank You Quote
Administrators PlausiblyDamp Posted April 26, 2006 Administrators Posted April 26, 2006 It looks as though the SMTP class in .Net is actually using ESMTP (basically extensions to SMTP and a very common format these days) but the server in question doesn't support it. What version / make is the SMTP server in question? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
pendragon Posted April 26, 2006 Author Posted April 26, 2006 Hi PlausiblyDamp Thank you for your reply. First sorry for putting this in the wrong section. The server is an old version (1997 I think) of TFS Post Office, I think that you are right and it does not support ESMTP, have emailed the company that makes it but not had a reply to this question. They did say that the new version is ESMTP compliant to some extent in that It supports 2 ESMTP parameters at the moment and those are "8BITMIME" and the "SIZE" parameter. Is there anyway that you know of that I can default the SMTP Class to use SMTP and not ESMTP. If not is there any documentation that you (or anyone else) knows of that can tell me what it would expect from the server to recognise it as an ESMTP server so that I can check to see if upgrading will work. (I know it is a lot to ask but have been searching the Net for 2 days now and am at my wits end) Thank you for your time Quote
Administrators PlausiblyDamp Posted April 26, 2006 Administrators Posted April 26, 2006 Not been able to find much on the SmtpClass that gives any information about dealing with SMTP / ESMTP servers.... Easiest way to check if the server supports ESMTP is to telnet into it on Port 25 and type EHLO - if it responds with an OK then it is ESMTP, if it errors but responds when you do HELO then it only supports SMTP. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
pendragon Posted April 27, 2006 Author Posted April 27, 2006 Thanks for that PlausiblyDamp, you are right telnet comes up with an error when I send that command, so it does not support ESMTP. What I think I shall do is get the upgrade and see if the new version works with it. Hopefully Microsoft will publish some more detailed information on the SMTP class at some point Thanks again for your time. Quote
mskeel Posted April 27, 2006 Posted April 27, 2006 This isn't a new problem; I've seen free mailers for C# in the past. A little searching should turn something up for SMTP. Quote
pendragon Posted May 3, 2006 Author Posted May 3, 2006 Just to let you know, having upgraded to the latest TFS all now works OK. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.