We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    Did you try Quick email with &debug=`1`?

    Also, go to System (gear icon) -> System Settings. Put SMTP in the search box at the upper right and press Enter.

    Here are my non-blank settings:

    SMTP Authentication mail_smtp_auth  Yes
    
    SMTP Hosts  mail_smtp_hosts  tls: //smtp.somewhere.com
    
    SMTP Keep-Alive  mail_smtp_keepalive No
    
    SMTP Password  mail_smtp_pass  ********************
    
    SMTP Port  mail_smtp_port  587
    
    SMTP Connection Prefix  mail_smtp_prefix  tls
     
    SMTP Timeout mail_smtp_timeout 10
     
    SMTP User mail_smtp_user [email protected]
    
    Use SMTP mail_use_smtp Yes
     
      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
      • 46577
      • 54 Posts
      Did you try Quick email with &debug=`1`?
      Yes, but my test page returns "Unauthorized" with or without debug set

      As for SMTP settings, mine were the same except for:
      SMTP Port mail_smtp_port 465
      Use SMTP mail_use_smtp No

      But if I change those, to 587 and Yes, the mail doesn't get sent and the page just returns to the form.
        • 3749
        • 24,544 Posts
        Is your "from" email address authorized to send mail from your server?
          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
          • 46577
          • 54 Posts
          afaik, yes. It's one of the addresses created in cPanel
            • 3749
            • 24,544 Posts
            When you turn SMTP on, what does QuickEmail say in debug mode?
              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
              • 46577
              • 54 Posts
              just "Unauthorized"

              however, with Use SMTP set to "Yes", the Formit form does not redirect, the user is sent back to the form page, and no mail is sent.

              with SMTP set to "No", everything works wrt to Formit, but QuickEmail still returns "Unauthorized" [ed. note: grogorio last edited this post 5 years, 8 months ago.]
                • 3749
                • 24,544 Posts
                QuickEmail only runs if you're logged in -- otherwise, it just returns "unauthorized." So it's not really telling you anything yet. I think it will work if you "view" the page with the QuickEmail tag from the Manager.
                  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
                  • 46577
                  • 54 Posts
                  ah I see...

                  so with Use SMTP to "No":

                  Send reported successful

                  but when set to "Yes":

                  Send Failed
                  Mailer error info: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
                  Server Debug Information:

                  2018-08-19 05:25:02 SERVER -> CLIENT:

                  2018-08-19 05:25:02 CLIENT -> SERVER: EHLO www.pgh3.org

                  2018-08-19 05:25:02 SERVER -> CLIENT:

                  2018-08-19 05:25:02 SMTP ERROR: EHLO command failed:

                  2018-08-19 05:25:02 SMTP NOTICE: EOF caught while checking if connected

                  SMTP Error: Could not connect to SMTP host.

                  SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

                  could this be a restriction imposed by the host (Hostgator)? Had a quick look at the troubleshooting wiki and noticed problems with Godaddy.

                  I'm ok with just leaving SMTP set to "No", if this is going to be a big deal to troubleshoot. [ed. note: grogorio last edited this post 5 years, 8 months ago.]
                    • 3749
                    • 24,544 Posts
                    SMTP is usually more reliable, but if you have it turned off, MODX uses its version of PhpMailer, which ultimately uses the PHP mail() function. Many hosts have that turned off, but apparently not yours if QuickEmail could send without SMTP.

                    Debugging SMTP is a pain, so you might want to just use mail(), though there's a chance your host could turn it off at some point.

                    None of this explains your FormIt problem though. TBH, I never use FormIt for mail (or anything else for that matter). If you're looking for a simple contact form, you might try SPForm. Otherwise, someone who uses FormIt will probably be more help.

                    The only thing I can suggest is checking all the mail fields reported in QuickEmail against the ones you're using with FormIt.
                      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
                      • 46577
                      • 54 Posts
                      thanks for the tip Bob I will check out SPForm. Formit is probably overkill for my modest requirements