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

SMTP mailer is set, even though configured not to use SMTP

XMLWordPrintable

    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • w51_MDL-37152_m25_smtp
    • Hide

      0/ configure moodle to use SMTP server for mail sending and smtpmaxbulk > 1
      1/ trigger some action that mails multiple emails via SMTP (such as forum mailing to multiple users). Verify mails are sent.
      2/ repeat with other non-smtp mail type (hint: set smtp hosts to 'qmail' or leave empty for sendmail). Verify no "SMTP Error: Could not connect to SMTP host" is logged / shown and mails are sent.

      Show
      0/ configure moodle to use SMTP server for mail sending and smtpmaxbulk > 1 1/ trigger some action that mails multiple emails via SMTP (such as forum mailing to multiple users). Verify mails are sent. 2/ repeat with other non-smtp mail type (hint: set smtp hosts to 'qmail' or leave empty for sendmail). Verify no "SMTP Error: Could not connect to SMTP host" is logged / shown and mails are sent.

      We are experiencing the same issue as described in this bug report: http://tracker.moodle.org/browse/MDL-29494

      Users are getting this error message: "SMTP Error: Could not connect to SMTP host", although our configuration uses default PHP mail function (smtphosts is empty).

      Looking at the source I found that $mail->IsSMTP() is being called in email_to_user function after a message is successfully sent (lib/moodlelib.php line 5469 in MOODLE_23_STABLE, 5505 in MOODLE_24_STABLE).

      A quick workaround is to set smtpmaxbulk to 1 - so that the same incorrectly reconfigured mailer is not reused for next messages.

            skodak Petr Skoda
            aurelijus Aurelijus Bruzas
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.