We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50275
    • 2 Posts
    I've seen a few other posts like this on here, but none have solved my problem. when I fill in the formit form and hit submit, I get redirected to my email sent page, but I never get the email. The page validation works fine too. I get no errors. I've checked the php log files and get no errors. I completely uninstalled formit and reinstalled and started over with this simple form:

    [[!FormIt?
       &hooks=`email,redirect`
       &emailTpl=`MyEmailChunk`
       &emailTo=`[email protected]` (changed)
       &redirectTo=`1`
       &validate=`name:required,
          email:email:required,
          text:required:stripTags`]] 
      
    [[!+fi.validation_error_message:notempty=`<p>[[!+fi.validation_error_message]]</p>`]]
      
    <form action="[[~[[*id]]]]" method="post" class="form" id="contact-form"> 
        <h1>Send us a message</h1>
        <div class="row">
            <div class="col-md-6">
                <input type="text" name="name" id="name" placeholder="Name" value="[[!+fi.name]]" />
                  
            </div>
            <div class="col-md-6">
                <input name="email" id="email" type="email" placeholder="Email"  value="[[!+fi.email]]">
            </div>
        </div>
        <textarea name="text" id="text" placeholder="Message" value="[[!+fi.text]]">[[!+fi.text]]</textarea>
      
        <div class="submit-area">
            <input type="submit" id="submit_contact" value="Send Message">
                                          
        </div>
    </form>
    


    rather than putting it in a chunk I put it directly on the page (which seems like it should work). I readded the quickmail test:

    [[!QuickEmail? &debug=`1`]]


    at the bottom of the page and that still worked fine.

    Any ideas??

    Thanks!

    This question has been answered by mmcgee. See the first response.

    • discuss.answer
      • 19872
      • 1,078 Posts
      Do you maybe need to include &emailFrom:
        • 50275
        • 2 Posts
        Haha that did it! I have no idea why the default wasn't working but seriously thank you so much!
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Your SMTP server may be configured to drop any outgoing emails that don't have certain headers in order to reduce the use of spambots.
            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
            • 19872
            • 1,078 Posts
            Glad you got it worked out. Those forms can be so stubborn sometimes.