February 17, 20214 yr 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.
February 17, 20214 yr 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.
February 18, 20214 yr Author 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. Thanks.
Create an account or sign in to comment