We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40088
    • 708 Posts
    Revo 2.3
    FormIt 2.2.0

    I have 8 forms, and they submit to different host accounts, e.g. the domain, gmail and aol. They all work fine using port 587, but I've never been able to get them to work via a secure connection (SSL/TLS) using the host's instructions. The problem is that I don't understand the correct syntax to use in the SMTP System Settings and/or if it even matters that I'm using 8 different accounts?

    Could someone either point me towards a tutorial or explain step-by-step how to configure each of the SMTP Settings so I can finally use a secure connection? [ed. note: todd.b last edited this post 11 years, 10 months ago.]
      Todd
      • 3749
      • 24,544 Posts
      This works for me with Gmail:

      SMTP Port -- mail_smtp_port -- 465

      SMTP Connection Prefix -- mail_smtp_prefix -- tls
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 40088
        • 708 Posts
        Thanks Bob, I tried but no luck yet.

        Here are the generic settings taken from the hosting cPanel:

        Password: Use the email account’s password.
        Incoming Server: my.server.com
        IMAP Port: 993
        Outgoing Server: my.server.com
        SMTP Port: 465
        Authentication is required for IMAP, POP3, and SMTP.
          Todd
          • 3749
          • 24,544 Posts
          You need to ask the host what port to use for secure email and whether the prefix should be ssl or tls. It depends on how they have things set up.

          I send all my email through Mandrill now using the MandrillX extra, though it does require you to write some of your own code (which could be in a FormIt postHook).
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 40088
            • 708 Posts
            I received this reply from the host which helps,

            The SMTP Hosts setting selects which mail servers to send mail through. It should be set to "localhost", and it looks like it is in the screenshot. To securely transmit mail to the mail server, you will need to use port 465 for the SMTP Port setting and set SMTP Connection Prefix to "ssl". You may also need to change SMTP Authentication to Yes and provide a valid email account and password to send with.

            Ok, that mostly makes sense to me. What I don't understand is if I need to provide a valid email account/password yet the forms are submitting to different mail servers (the actual domain, gmail, aol) how does that get setup? Or am I not understanding the process correctly?
              Todd
              • 3749
              • 24,544 Posts
              That's a tough one. The MODX SMTP settings assume that you're using the same SMTP host for all sends. I'm not sure how you could do what you want.

              The only think I can think of is either Context settings and put the sending pages in different contexts, or user settings and have different users send the mail.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 40088
                • 708 Posts
                Well, the different forms/emails are being sent from the same SMTP Host (some.mailserver.com), it's just that the destination mail server varies.

                I guess I'm unclear as to what exactly happens when a message is submitted and how the host domain communicates with the Gmail and AOL server(s). What I do know is that everything works using port 587, but perhaps that's only because it's not a secure connection so there are fewer hoops to jump through.
                  Todd
                  • 3749
                  • 24,544 Posts
                  The destination email address shouldn't make any difference as long as it's a real email address (i.e., not @localhost).

                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting