简体   繁体   中英

Do mails sent with PHP Mailer send automatically when the connection is correct?

I would like to ask what happens if the PHP Mailer library fails to send an email via SMTP. The service connects to the SMTP server but emails are not send at all. Do these email go to some kind of queue and are send when the problem is solved or will I have to resend them once more from the code?

Thanks in advance for help.

As far as PHPMailer is concerned, messages are either sent or they are not; it does no queuing of its own because it's not a mail server. Set $mail->SMTPDebug = 2; to see the whole conversation with your mail server. It may be that your mail server does queue, and may take a while to deal with onward delivery, but that's beyond the control of PHPMailer. Your mail server logs (if you have access to them) will also tell you what it's doing. All of this is covered in the PHPMaielr docs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM