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
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
You can get the last SMTP error by calling $mail->getSMTPInstance()->getError();
. It returns a structure like this:
[
'error' => '',
'detail' => '',
'smtp_code' => '',
'smtp_code_ex' => ''
]
The value you are looking for will be in the smtp_code
property.