We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10532
    • 5 Posts
    Hi all,

    Been quite satisfied with MODx so far, and have only come across one real issue: my eForm-generated contact form is not sending an email. No alert is being raised, nothing appears amiss; I simply don’t receive an email in the specified inbox.

    The only resolution to this problem I found at this existing MODx forum post: http://modxcms.com/forums/index.php/topic,18711.0.html. Has there been any progress since then, or should I still assume I need to hardcode things?

    I’m using a GoDaddy-based host, and I apparently need to ’use [tt]relay-hosting.secureserver.net[/tt] for [my] relay server’ which I imagine means using that URI for the $Host variable in [tt]class.phpmailer.php[/tt].

    If that’s not what I need to do, please help me with a more current solution. My current eForm call is:
    [!eForm? &formid=`contact` &tpl=`contact_form` &report=`contact_report` &to=`my_email@my_domain.tld` &subject=`Website Contact Form Submission`!]


    Much thanks!
    Gavin
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If the php mail() function works then your php is configured to use that host, and you’ve got a different problem. If the php mail() function doesn’t work (it is often restricted for security reasons) then you can try editing the eForm snippet to use SMTP instead.

      Perhaps one of these days somebody will make this an eForm configuration option.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 10532
        • 5 Posts
        Thanks, Susan! I’m now stuck wondering what I should do in terms of diagnosis. My host says mail() should work with no obstruction, but something between clicking "Submit" and my email inbox is getting in the way of a successfully delivered message.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Try this; create a new web user with your email address and select the "send the new password by email". See if you get the message. At least that way you’ll know if MODx can send email, and can focus on the eForm for errors.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 10532
            • 5 Posts
            Got the "login details" message instantly. I presume MODx uses mail() to send?
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Yes. At least now we know it’s a problem with eform. It’s 3am here; I’ll bookmark this post and get back to it after some sleep!
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 10532
                • 5 Posts
                Figured it out: My &formid didn’t match that of the template.

                So my only remaining question is: When using [tt]&subject=`select`[/tt] (where select is a drop-down) is there a way to have it send the text of the drop down option, rather than the cardinal?
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  No. It’s the value of the POST (the value of the option the user selected) that is used. You could, however, create a snippet to use with eForm’s OnBeforeMailSent event to convert the POST value to whatever you wanted.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org