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

No option in email settings to speccify SSL or TLS (SMTPSecure property of PHPMailer)

    XMLWordPrintable

Details

    • MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • MOODLE_30_STABLE
    • MDL-30960_master
    • Hide

      in moodle 2.2, editing get_mailer() function in /lib/moodlelib.php to add:
      $mailer->SMTPSecure = "tls"; // or "ssl";
      after $mailer->IsSMTP();

      Similar fixes can also be done directly in the /lib/PHPMailer files to force SSL/TLS.

      Show
      in moodle 2.2, editing get_mailer() function in /lib/moodlelib.php to add: $mailer->SMTPSecure = "tls"; // or "ssl"; after $mailer->IsSMTP(); Similar fixes can also be done directly in the /lib/PHPMailer files to force SSL/TLS.
    • Hide

      1. find a SMTP server that accepts TLS or SSL only
      2. specify the full SMTP hostname:port in Email settings, e.g.:smtp.example.com:587
      3. open up /login/forgot_password.php in browser and trigger a password reset email
      4. the cannotmailconfirm error show up

      Show
      1. find a SMTP server that accepts TLS or SSL only 2. specify the full SMTP hostname:port in Email settings, e.g.:smtp.example.com:587 3. open up /login/forgot_password.php in browser and trigger a password reset email 4. the cannotmailconfirm error show up

    Description

      There is no option to specify the SMTPSecure property of PHPMailer in the admin email settings section. Specifying just the :port by itself is insufficient to trigger PHPMailer to use SSL/TLS connection prefix and will not initiate the connection correctly.

      If I remember correctly, this has been an issue since early 1.x (1.6?).

      Attachments

        Issue Links

          Activity

            People

              danielneis Daniel Neis Araujo
              davidtang David Tang
              Marina Glancy Marina Glancy
              Dan Poltawski Dan Poltawski
              Ankit Agarwal Ankit Agarwal
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                16/Nov/15