We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7327
    • 195 Posts
    Hey guys,

    I'm using MODX 1.0.12. I'm talking about the email settings in MODX's Tools -> Configuration -> User tab.

    I was able to set Sendmail's method to SMTP and use the standard settings (standard, non-SSL/TLS setting) based on what my cPanel provides. But when I try using the SMTP SSL/TLS recommended settings (again from cPanel instructions, usually just setting a different host name and port 465), the forms don't work. It keeps giving me an error about mail() not being connected. Anyone had this prob before and figured this out?


    EDIT:
    Was looking over the approved answer here:

    http://stackoverflow.com/questions/18535294/mail-not-sending-with-phpmailer-over-ssl-using-smtp

    and noticed there's no equivalent of this line on the manager config page:

    $mail->SMTPSecure = "ssl";

    Might this be thee issue? And if so, where can I force apply this without editing the manager page?

    EDIT 2:

    Ok, I figured it out. Just needed to edit the file class.phpmailer.php in manager/includes/controls/phpmailer and set the above as the default value instead of a blank "". Not elegant but at least it works.. [ed. note: diatomin last edited this post 12 years, 5 months ago.]
      • 13428 ☆ A M B ☆
      • 1,031 Posts
      You could create an feature request for this on GitHub or prepare a pull request with the code to make it changeable by MODX system setting.
        • 33991
        • 65 Posts
        Vasiliy Naumkin Reply #3, 12 years ago
        You can try to use ssl://smtp.service.com in mail_smtp_hosts.

        For example, I am using ssl://smtp.yandex.ru and port 465 - it works without modifying of core files.
          • 36416
          • 589 Posts
          Quote from: bezumkin2 at Sep 16, 2014, 09:58 PM
          You can try to use ssl://smtp.service.com in mail_smtp_hosts.
          For example, I am using ssl://smtp.yandex.ru and port 465 - it works without modifying of core files.

          Really, in latest Evolution with PHPMailer 5.2.6?
          Useful information, thanks.
            • 33991
            • 65 Posts
            Vasiliy Naumkin Reply #5, 12 years ago
            I don`t know about Evolution, but it works in Revolution with PhpMailer 2.0.4 (April 02, 2009).