[[!FormIt? &hooks=`recaptchav2,spam,email,redirect,FormItAutoResponder` &emailTpl=`EmailTpl` &emailTo=`[email protected]` &emailSubject=`'Contact Us' inquiry: [[+category]]` &fiarTpl=`AutoResponseTpl` &fiarSubject=`Thank You for Contacting Us` &fiarToField=`email` &fiarFromName=`My Company` &fiarFrom=`[email protected]` &redirectTo=`23` &store=`1` &validate=`nospam:blank, category:required, name:required, email:email:required, comment:required:stripTags` &vTextRequired=`Enter a value for this field` &category.vTextRequired=`Select a category` &name.vTextRequired=`Enter your name` &email.vTextRequired=`Enter your email address` &email.vTextEmailInvalid=`Enter a valid email address` &comment.vTextRequired=`Enter your comment or question` &validationErrorMessage=`<div class="val-error-hdr"> <a href="[[~22]]" class="btn float-right">Reset form</a> <h3>Please review the following errors:</h3> <ul> [[+errors]] </ul> </div>` ]] [[!+fi.validation_error_message]] <h1 class="form-header">How May We Help You?</h1> <form action="[[~[[*id]]]]" id="form-contact" method="post"> ...
[[!FormIt? &hooks=`recaptchav2,spam,email,FormItAutoResponder,redirect` &emailTpl=`EmailTpl` &emailTo=`[email protected]` &emailSubject=`'Contact Us' inquiry: [[+category]]` &fiarTpl=`AutoResponseTpl` &fiarSubject=`Thank You for Contacting Us` &fiarToField=`email` &fiarFromName=`My Company` &fiarFrom=`[email protected]` &store=`1` &validate=`nospam:blank, category:required, name:required, email:email:required, comment:required:stripTags` &vTextRequired=`Enter a value for this field` &category.vTextRequired=`Select a category` &name.vTextRequired=`Enter your name` &email.vTextRequired=`Enter your email address` &email.vTextEmailInvalid=`Enter a valid email address` &comment.vTextRequired=`Enter your comment or question` &validationErrorMessage=`<div class="val-error-hdr"> <a href="[[~22]]" class="btn float-right">Reset form</a> <h3>Please review the following errors:</h3> <ul> [[+errors]] </ul> </div>` &redirectTo=`23`]]
I'm see you have tried swapping the sequence of events around, and I may have misunderstood what you have tried, so apologies if this is what you have already done.
Does it work if you put redirect at the end, both in the &hooks line and when specifying where to redirect to with the &redirectTo=`23` as in the sample here: ...
&hooks=`recaptchav2,spam,email,FormItAutoResponder,redirect`
&redirectTo=`23`
If FormItAutoresponder returns false, the error should be logged according to the code. Any errors in the MODX error log?
[2018-03-15 15:40:46] (ERROR @ /paas/c0205/www/core/cache/includes/elements/modsnippet /3.include.cache.php : 145) [FormIt] An error occurred while trying to send the auto-responder email: SMTP Error: data not accepted.SMTP server error: DATA END command failed
2018-03-16 00:33:45 SERVER -> CLIENT: 220-ld149.smtpserver_goes_here.com ESMTP Exim 4.89_1 #1 Thu, 15 Mar 2018 17:33:45 -0700 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail. 2018-03-16 00:33:45 CLIENT -> SERVER: EHLO c0205.paas1.tx.modxcloud.com 2018-03-16 00:33:45 SERVER -> CLIENT: 250-ld149.smtpserver_goes_here.com Hello paas1.tx.modxcloud.com [173.193.182.146] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250-CHUNKING 250 HELP 2018-03-16 00:33:45 CLIENT -> SERVER: AUTH LOGIN 2018-03-16 00:33:45 SERVER -> CLIENT: 334 VXNlcm5hbWU6 2018-03-16 00:33:45 CLIENT -> SERVER: a2FybEB6dXJpbnN0aXR1dGUuY29t 2018-03-16 00:33:45 SERVER -> CLIENT: 334 UGFzc3dvcmQ6 2018-03-16 00:33:45 CLIENT -> SERVER: WTg+NyRKTT1MPw== 2018-03-16 00:33:45 SERVER -> CLIENT: 235 Authentication succeeded 2018-03-16 00:33:45 CLIENT -> SERVER: MAIL FROM: 2018-03-16 00:33:45 SERVER -> CLIENT: 250 OK 2018-03-16 00:33:45 CLIENT -> SERVER: RCPT TO: 2018-03-16 00:33:45 SERVER -> CLIENT: 250 Accepted 2018-03-16 00:33:45 CLIENT -> SERVER: DATA 2018-03-16 00:33:45 SERVER -> CLIENT: 354 Enter message, ending with "." on a line by itself 2018-03-16 00:33:45 CLIENT -> SERVER: Date: Thu, 15 Mar 2018 19:33:45 -0500 2018-03-16 00:33:45 CLIENT -> SERVER: To: "[email protected]" 2018-03-16 00:33:45 CLIENT -> SERVER: From: QuickEmail 2018-03-16 00:33:45 CLIENT -> SERVER: Reply-To: [email protected] 2018-03-16 00:33:45 CLIENT -> SERVER: Subject: Default Subject 2018-03-16 00:33:45 CLIENT -> SERVER: Message-ID: <[email protected]> 2018-03-16 00:33:45 CLIENT -> SERVER: X-Mailer: PHPMailer 5.2.21 (https://github.com/PHPMailer/PHPMailer) 2018-03-16 00:33:45 CLIENT -> SERVER: MIME-Version: 1.0 2018-03-16 00:33:45 CLIENT -> SERVER: Content-Type: text/html; charset=UTF-8 2018-03-16 00:33:45 CLIENT -> SERVER: 2018-03-16 00:33:45 CLIENT -> SERVER: Default Message 2018-03-16 00:33:45 CLIENT -> SERVER: 2018-03-16 00:33:45 CLIENT -> SERVER: . 2018-03-16 00:33:50 SERVER -> CLIENT: 250 OK id=1ewdJZ-002kZB-Qh 2018-03-16 00:33:50 CLIENT -> SERVER: QUIT 2018-03-16 00:33:51 SERVER -> CLIENT: 221 ld149.smtpserver_goes_here.com closing connection
When a hook fails, the hooks after it in the list don't execute.
One possible cause is having a from email address for the autoresponder that is not authorized to send from your server (i.e., no mail account with that email address).
Some other ideas here: https://www.google.com/search?q=SMTP+server+error%3A+DATA+END+command+failed&oq=SMTP+server+error%3A+DATA+END+command+failed
&fiarFrom=`[email protected]` &fiarReplyTo=`[email protected]`