<![CDATA[ Formit redirect not working IF FormItAutoResponder is used - My Forums]]> https://forums.modx.com/thread/?thread=103616 <![CDATA[Formit redirect not working IF FormItAutoResponder is used]]> https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557395
[[!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">
...


With this configuration, the recaptcha, email and autoresponse works fine, but it does not redirect. If I remove the FormItAutoResponder parameter, then redirect starts working.

Somehow, FormItAutoResponder is aborting the redirect before it can complete.

I have tried positioning FormItAutoResponder before the 'redirect' parameter, and it still stops the redirect from happening.

Any ideas on how to troubleshoot this?

Thanks in advance..

Karl]]>
kjforsyth Mar 15, 2018, 05:59 PM https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557395
<![CDATA[Re: Formit redirect not working IF FormItAutoResponder is used]]> https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557493 andytough Mar 20, 2018, 12:03 PM https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557493 <![CDATA[Re: Formit redirect not working IF FormItAutoResponder is used]]> https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557486
To recap, I was using an SMTP server associated with our web host (InMotion) to handle the email functions associated with a Contact Form. Apparently, even though the autoresponder would sucessfully send a response, it would also prevent a redirect from occurring.

This failure appears to be related to a failure during autoresponse, which is shown with this error in the MODX log:

[FormIt] An error occurred while trying to send the auto-responder 
email: SMTP Error: data not accepted.SMTP server error: DATA END command failed


I tried switching to a different SMTP server, using the 'smtp-relay.gmail.com' SMTP server associated with a Google account. I am authenticating with a 'Google app password' rather than the two-factor authentication normally required for that account, and everything is working swimmingly!

Apparently, there was some issue with the InMotion SMTP server that is not there with the Google SMTP server. So this is solved. Sorta. ;-) Thanks again!

Karl]]>
kjforsyth Mar 20, 2018, 02:31 AM https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557486
<![CDATA[Re: Formit redirect not working IF FormItAutoResponder is used]]> https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557484
However I noticed on this page https://docs.modx.com/extras/revo/formit/formit.hooks/formit.hooks.formitautoresponder that fiarReplyTo is a required field.

Having said that I have just removed that line form my own form and it didn't break the form.

]]>
andytough Mar 19, 2018, 11:10 PM https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557484
<![CDATA[Re: Formit redirect not working IF FormItAutoResponder is used]]> https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557482
See: https://docs.modx.com/extras/revo/formit/formit.hooks
]]>
wshawn Mar 19, 2018, 11:04 PM https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557482
<![CDATA[Re: Formit redirect not working IF FormItAutoResponder is used]]> https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557467
I'm not sure I'm understanding you. Every message I get through my contact form has the user who filled it out as the reply-to address, but the emailsender System Setting for the from address.

For the thousands of messages I've sent with Notify, the two are also different (reply-to is empty).

I guess it would be possible to configure the server to require those to be the same, but I've never seen it, and such a configuration would make standard contact forms impossible. I did find this suggestion, which seems promising:

Some servers require that the From email address is the same as the email address used to authenticate. Check your from name and match it to the username you use to login to your SMTP server.

It could also conceivably be a character set issue or a problem with the formatting of the mail body.]]>
BobRay Mar 19, 2018, 07:42 PM https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used?page=2#dis-post-557467
<![CDATA[Re: Formit redirect not working IF FormItAutoResponder is used]]> https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used#dis-post-557465
I hope all is well with you.

I think it may be different if the email that is being sent actually specifies that the reply to and the from fields should be different from one another?

This error...

SMTP Error: data not accepted.SMTP server error: DATA END command failed


...does seem to relate in some cases to specifying a different 'reply to'.



]]>
andytough Mar 19, 2018, 05:52 PM https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used#dis-post-557465
<![CDATA[Re: Formit redirect not working IF FormItAutoResponder is used]]> https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used#dis-post-557439 BobRay Mar 17, 2018, 04:56 AM https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used#dis-post-557439 <![CDATA[Re: Formit redirect not working IF FormItAutoResponder is used]]> https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used#dis-post-557415 &fiarReplyTo help?

&fiarFrom=`[email protected]`
&fiarReplyTo=`[email protected]`


Looking at the report from SMTP test it looks like you are logging in to the server using the address kjf@. Perhaps if Formit Auto Responder does not specify a ReplyTo then the system sends kjf@ as the reply to. This would cause a mismatch between the sender and the replay to which could cause the error you are seeing.

If this does not help could you post all your code so that we can see if there is a problem in any of your templates or forms?

This would include the contents of &emailTpl=`EmailTpl`, &fiarTpl=`AutoResponseTpl` the form and the code on resource id 23



]]>
andytough Mar 16, 2018, 08:51 AM https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used#dis-post-557415
<![CDATA[Re: Formit redirect not working IF FormItAutoResponder is used]]> https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used#dis-post-557411 BobRay Mar 16, 2018, 05:05 AM https://forums.modx.com/thread/103616/formit-redirect-not-working-if-formitautoresponder-is-used#dis-post-557411