Telnet SMTP gives OK but not accepted or queued message and mails not received

asp-classicsmtptelnetwindows-server-2008

I am trying to debug a CDO.Message.1 error '80040213', The transport failed to connect to the server.

So I am testing the connection to the SMTP server via telnet. After entering the DATA I am getting this response:

250 ok 1515609773 qp 24996

On a different SMTP server I am getting something like (from memory):

250 ok id=734E5544AB

I am expecting a message about the email being queued or accepted. Maybe all SMTP servers do this differently?

In any case the most important thing is the emails never arrive. Is that related to the Transport failed message? CDO sees the emails are not actually getting sent?

I am running telnet from a Windows Server 2008 Datacenter SP1 Azure VM.

Best Answer

Ok I figured it out. The standard way to test and SMTP server via telnet that I found in three different places is WRONG!

They are not RFC 5322 compliant in that they do not set the From header. Without a From header, many email servers (like gmail) will bounce the email back as it is suspected spam. To "help" matters along Gmail will hide the bounce in the spam folder so you never get the first clue as to what's wrong.

Here is the right way to send an email via telnet

Simply put, you need to add from: name@yourdomain.com in the DATA. You can also add to: and subject:. I do not know if those are helpful or required, didn't test that.