We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32330
    • 40 Posts
    I am using Godaddy to host a website and my Formit form will not send properly unless the email in the email block is hosted at Godaddy. This issue was raised and I read about it here:

    http://forums.modx.com/index.php?topic=54348.0

    I tested this with one of my Godaddy emails and sure enough the form works great as suggested.
    This post brings up the issue which seems to be Godaddy is blocking the processing of the form. I tried using SMTP as suggested on that post as well thru a gmail account but I just get the message that the SMTP host cannot be reached. I also tried changing the "sent from" setting within said gmail account to an email I have hosted at Godaddy but still get the same "host cannot be reached" message on the form page so it seems that is not a work around for my situation.
    When SMTP is disabled in the global settings of my site the form processes and I get my redirect page but nothing ever makes it to my email account.

    I built the site on a temporary host, not Godaddy, so I know my form and formit is all set up right because it works great over there.

    So my question is: Is there a work around for Godaddy hosting that works with formit?
    Do I need to purchase an SMTP email on Godaddy to make it work? I have emails on Godaddy and I could use that as the sent from addy similar to what is suggested in the post I linked above but when I looked at the code BobRay suggested to change it looks much different in the version of Revo I am running. I am not a PHP guy so butchering the snippet code makes me nervous. I don't mind changing it and then including the email in the message body as suggested but I am not really sure how to make that happen as far as where to drop in suggested code to have it show up in the "message body".
    I did not do a site migration from the temp server. I did a clean install of Revo and just rebuilt all my templates, TVs and chunks in a new database. I am using MODX Revolution 2.1.3-pl (traditional).

    What are my work around options to get my form working? I am not planning on using Godaddy for hosting on a regular basis but for this situation it seems I am stuck there. [ed. note: whitesphynx last edited this post 12 years, 6 months ago.]
      MODx helps me stay in the white
      • 3749
      • 24,544 Posts
      Try downloading QuickEmail and run it with &debug=`1`. It might give you a better diagnostic message. SMTP should work if you set all the SMTP System Settings correctly.

      There's some information on that here: http://bobsguides.com/quickemail-snippet-tutorial.html
        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
        • 32330
        • 40 Posts
        Thanks BobRay.
        It's good to know that it should work with Godaddy.

        So from that advice I went and uninstalled/reinstalled Formit. Double checked my user/password in the settings. Cleared my cache and flushed the sessions. Then tried my form again and got the same message:
        An error occurred while trying to send the email. SMTP Error: Could not connect to SMTP host.


        So then I followed your link, thanks for the tool/snippet!, and set up a new doc, inserted and ran QuickEmail. I also installed and ran it on the temp server.

        The only difference in what is generated between the two is on the Godaddy hosted site when I turn on SMTP I get a
        Send Failed
        
        Mailer error info: SMTP Error: Could not connect to SMTP host.
        Server Debug Information:
        
        SMTP -> ERROR: Failed to connect to server: Connection refused (111)

        at the end of the page where the report shows up. I looked up the error code and it just says the smtp is denying connection.

        I am pretty confident that I am entering the smtp settings correctly, user/pass is correct for sure, and my use of Formit is right so I'm not sure where to go from here.

        I am attaching a SS of my smtp settings for view.

        Thanks for the help. [ed. note: whitesphynx last edited this post 12 years, 6 months ago.]
          MODx helps me stay in the white
          • 3749
          • 24,544 Posts
          Try changing the SMTP port to 465.
            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
            • 32330
            • 40 Posts
            I tried that. And changing the prefix to SSL to match that port. Still comes up with the same result in QuickEmail.

            I spoke to Godaddy tech support earlier when the problem first occurred before posting here but didn't have much luck. The guy didn't really know anything about MODX, nor did I expect him to, and just kept bringing up the Godaddy php mailer.
            I'm thinking of contacting them again but I doubt that it would be fruitful. Gotta be a work around for me within MODX.
              MODx helps me stay in the white
              • 3749
              • 24,544 Posts
                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
                • 32330
                • 40 Posts
                SOLVED

                I had listed that post in my initial topic and I have read thru it, but per your advice I went back to it for another look.
                Not seeing an immediate solution I decided basically to start from scratch again with the SMTP solution, I really wanted to get that to work. I tried adjusting some more settings within my gmail account and the system settings in MODX without any luck still getting the same results.

                At this point I basically gave up on the SMTP solution and went back to the other post and the results of your QuickEmail snippet and this brought closer attention to the
                '&emailFrom'
                hook which I did not use in my form. So I decided to play around with that a bit.
                (kicks self for overlooking the emailFrom hook)

                Sure enough that was a solution. Simply putting that hook into my formit call with my Godaddy email got the whole thing to work great! I am very happy laugh


                So for anyone who runs into the same problem as I did here is a quick step by step:

                1.Forget the SMTP config trying to use Gmail and leave those settings off.
                2. Setup any Godaddy email account to use in the hook. The thread we've linked states that the form only works with an email account hosted with the same domain as the one you are using your form on. This is not true. It will work with ANY email hosted with Godaddy. This also explains why if you have Godaddy tech support test your form it will work fine for them. Also good to note is that you get a free email account with every domain you have registered thru Godaddy so this is not anything you will have to purchase.
                3. Use the emailFrom hook in your formit call and put the Godaddy email in there.
                '&emailFrom=`[email protected]`

                4. That's it you are done. Just use the rest of the formit hooks and calls as normal.
                When you receive an email with these settings you will see your Godaddy email in the from listing, but in the message itself you will see whatever information the form user puts in for email and the rest. So using the dynamic
                value="[[+fi.email]]"
                in your form value will not be affected by using the emailFrom hook and will pull the user email you want/need to have and place it in the message body.

                This is what BobRay was referring to at the end of his post in the linked thread, but I was not fully understanding it.
                Thanks for the solution BobRay and knowing just when to send me back to the drawing board. laugh


                SOLVED [ed. note: whitesphynx last edited this post 12 years, 5 months ago.]
                  MODx helps me stay in the white
                  • 3749
                  • 24,544 Posts
                  I'm glad you got it working. Thanks for reporting back -- I'm sure your post will help others. smiley
                    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
                    • 37246
                    • 128 Posts
                    Grey Sky Media Reply #9, 11 years ago
                    I just wanted to +1 this godaddy issue. After my forms just randomly stopped sending, I tested using a different client's godaddy hosted email as the fromEmail and poof, worked perfect.
                      I LOVE MODX! | greyskymedia.com