"Could not connect to host" should not be a fatal error without retrying

Created on 6 May 2014, almost 11 years ago
Updated 26 November 2024, 4 months ago

I intermittently get this error trying to send email from my site:

SMTP error: Could not connect to host.

This is a transient error in my case, and usually happens because of bad timing when my ISP decides to restart their mail server to pick up a config change right when I'm trying to send email.

Based on the log messages, it appears that this error is fatal and causes the message to be discarded by phpmailer.

Any type of connection error shouldn't be fatal. The mail should be left in the queue to be retried again at a future date (such as the next cron run). Otherwise this is dataloss and my users are losing important notifications.

Putting up a banner notification for an admin to point out there is mail stuck in the queue if it's had excessive attempts would be a good idea (or at a minimum just good error logging so they might notice it in the log if someone complains about not getting mail)

✨ Feature request
Status

Closed: outdated

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States justdave

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine AstonVictor

    I'm closing it because the issue was created a long time ago without any further steps.

    if you still need it then raise a new one.
    thanks

Production build 0.71.5 2024