php - Get response code using smtp.com with phpmailer
862
It's possible? Get response code from smtp.com using phpmailer. I have the list of codes smtp.com, but using the variable $mail->ErrorInfo only get a description of error, I like get the code:
Thanks
Answer
Solution:
You can get the last SMTP error by calling
$mail->getSMTPInstance()->getError();
. It returns a structure like this:The value you are looking for will be in the
smtp_code
property.