Jump to content

Getting the SMTP error number

Recommended Posts

Is there any way to get the actual SMTP error number? 

The result of EmailSend is either 1 or ERROR

EmailLast Error gives a text description.

I'd really like the number when I'm trying to debug from the email server logs.

Link to post
Share on other sites

Hi Dave,

If there is an error that occurred on the SMTP side of things the plugin will return that error. For instance if a server requires TLS but it wasn't specified in the connect function you may see the error :

530 5.7.0 Must issue a STARTTLS command first. 

I am assuming you are asking about the "530 5.7.0" part of that error message. There is no way in the Email plugin to just get that code. The Email plugin will just relay back the error message that the server throws which usually includes the code and some kind of explanation of it. I suppose you could try and parse that out but it may be difficult to make dynamic. 

Link to post
Share on other sites

The reason I asked was that the error message I got back when trying to solve my current issue was simply "Can't send command to SMTP host" which as far as I can find is not a SMTP error message.

But your explanation of how the plugin works clears it up for me. If it is a SMTP error returned I will see the code. I can live with that.



Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Who Viewed the Topic

    2 members have viewed this topic:
    Tony Diaz  arni 
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.