Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70046

If mail server connection fails forum notification task does not fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.8.5
    • Fix Version/s: None
    • Component/s: Forum, Messages
    • Labels:
      None
    • Affected Branches:
      MOODLE_38_STABLE

      Description

      We have found that some of our forum e-mails have not sent, because there was a temporary problem connecting to the e-mail server, but the task for sending the mail completed as though it was a success. This means that some of our users were never getting forum e-mails (and we did not know until the complained since we did not have failed task logs).

      Sample of a CRON log entry (with redacted user details):

      Sending messages to username (123456)
      Error: lib/moodlelib.php email_to_user(): SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
      Post 1180546 sent
      Sent 1 messages with 0 failures
      

      It seems to me that in a case like this the task should fail, so that it can be retried later.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            nmagill Neill Magill
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: