We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29332
    • 80 Posts
    I know there was a similar post, but it didn’t help me. I used the eform, and have a simple contact form, but it doesn’t send me anything when I submit the form. I don’t know where I’m supposed to set the TO email either.

    Help!
      Teaching myself MODx
    • If you leave out the &to parameter the mail will be sent to the email address in your site Configuration. Otherwise, just put the email address (or comma-separated addresses if more than one) you want the email sent to:


      There are a number of reasons why mail doesn’t get sent (or doesn’t get received), depending on your server’s configuration. A common cause is when shared hosting providers block external mailings using the php mail() function. The solution for that is to modify eForm to use SMTP instead.
        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
        • 29332
        • 80 Posts
        Where do I find this piece of code?
          Teaching myself MODx
        • In the eform snippet call
          [!eForm? &to=`[email protected]`!]

          Of course, your eForm snippet will have more parameters than that, but that’s how you specify the "to" part.

          If you just want to leave it blank and use your default site email, that is set in the Manager in Tools -> Configuration, in the Interface & Features tab.
            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
            • 29332
            • 80 Posts
            Here is my code:
            [!eForm? &formid='EnquiryForm' &subject='[+subject+]' &to='[email protected]' &tpl='EnquiryForm' &gotoid='1' !]

            Granted, the email address is my real email address.
              Teaching myself MODx
              • 36592
              • 970 Posts
              You have to use back tick(`) instead of single quote(’) for snippet parameters.
                • 29332
                • 80 Posts
                Ok, I have that part taken care of, and I’m getting an email, but it says this:
                Document or chunk not found for template id= ’’
                What does that mean?
                  Teaching myself MODx
                • It means you have to make a chunk for the report, with a name that you use in the snippet parameters like this
                  &report=`reportTpl`

                  The chunk might look like this
                  <h3>Contact Input</h3>
                  <strong>Name:</strong> [+name+]<br />
                  <strong>Email:</strong> [+email+]<br />
                  <strong>Message:</strong> [+message+]<br />
                    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
                    • 29332
                    • 80 Posts
                    Ok, that worked! Thank you!
                      Teaching myself MODx
                      • 16552
                      • 2 Posts
                      Hi,
                      I am new to modx. Just install for few days and learning how to use it. Looks very good just that I have problem with the eForm 1.4.4.5. It is not sending the email when I click at "Send Message" in the contact form. I’ve placed all my emails at the config, siteadmin, admin and anywhere that I can find but still doesn’t work. I had tested the server with other CMS and works fine. Is there anything else that I should do?

                      here part of the default parameters in the eForm snippet

                      // eForm Params
                      ’vericode’ => isset($vericode)? $vericode:"",
                      ’formid’ => isset($formid)? $formid:"",
                      ’from’ => isset($from)? $from:$modx->config[’emailsender’],
                      ’fromname’ => isset($fromname)? $fromname:$modx->config[’site_name’],
                      ’to’ => isset($to)? $to:$modx->config[’emailsender’],

                      do I need to change anything?

                      Thanks.