[[!FormIt? &hooks=`recaptcha,spam,email,redirect` &emailTpl=`MyEmailChunk` &emailTo=`*********@gmail.com` &redirectTo=`[[~[[*id]]]]` &validate=`nospam:blank, name:required, email:email:required, subject:required` ]] [[!+fi.validation_error_message:notempty=`<p>[[!+fi.validation_error_message]]</p>`]] <form action="[[~[[*id]]]]" method="post" class="form"> <input type="hidden" name="nospam" value="" /> <label for="name"> Name: <span class="error">[[!+fi.error.name]]</span> </label> <input type="text" name="name" id="name" value="[[!+fi.name]]" /> <label for="email"> Email: <span class="error">[[!+fi.error.email]]</span> </label> <input type="text" name="email" id="email" value="[[!+fi.email]]" /> <label for="subject"> Subject: <span class="error">[[!+fi.error.subject]]</span> </label> <input type="text" name="subject" id="subject" value="[[!+fi.subject]]" /> <label for="text"> Message: <span class="error">[[!+fi.error.text]]</span> </label> <textarea name="text" id="text" cols="55" rows="7" value="[[!+fi.text]]">[[!+fi.text]]</textarea> <br class="clear" /> <!--[[!+formit.recaptcha_html]]--> <!--[[!+fi.error.recaptcha]]--> <br class="clear" /> <div class="form-buttons"> <input type="submit" value="Send Contact Inquiry" /> </div> </form>
[[!FormIt? &hooks=`email` &emailTpl=`sentEmailTpl` &emailSubject=`Test Message` &emailTo=`*****************@gmail.com` ]] <form action="[[~[[*id]]]]" id="contact-form"> <input type="text" class="contact-info" id="contact_name" name="contact_name" placeholder="Your name" value="[[+fi.contact_name]]" /> <input type="text" class="contact-info" id="email" name="email" placeholder="Your email" value="[[+fi.email]]" /> <input type="text" class="contact-info" id="subject" name="subject" placeholder="Subject" value="[[+fi.subject]]" /> <textarea class="contact-info" id="message" name="message" rows="10" placeholder="Your message">[[+fi.message]]</textarea> <input type="button" id="clear-fields" value="Clear fields" /> <div class="captcha"></div> <input type="submit" id="send-message" value="Send your message" /> </form>
Message from: [[+contact_name]]<br /> <strong>[[+subject]]</strong><br /> <p>[[+message]]</p> <br /> For replying to [[+contact_name]], send an email to <a href="mailto:[[+email]]">[[+email]]</a>
I'm glad it worked. Thanks for reporting back.
Thank you thank you thank you!!!!! I've been bleeding over this computer monitor trying to figure out why my form wouldn't send me an email and your solution helped me out tremendously.
Try downloading the QuickEmail package and preview the resource it installs. It can help diagnose email problems.
Most localhost setups have no working mail server and it's a huge pain to install and configure one.
Most likely, you will have to configure MODx to use SMTP.
Go to System -> System Settings and put SMTP in the search filter box at the upper right.
FYI, these settings will work with Gmail:
SMTP Authentication: Yes
SMTP Connection Prefix: tls
SMTP Hosts: smtp.gmail.com
SMTP Password: yourGmailPassword
SMTP Port: 465
SMTP User: yourGmailUsername
Use SMTP: Yes