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

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

    Details

    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w51_MDL-37152_m25_smtp

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jan/13