We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19872
    • 1,078 Posts
    Sometimes an email from my web form is either never sent, or at least I never receive it. This issue started soon after upgrading MODx to 2.4.2, at which point I took steps to update FormIt, and use the FormIt to database feature. FormIt to DB is working perfect. Would be nice to just get an email. Of course, each time I check the form and send a test submission, the email is successfully sent and received.

    What might cause the FormIt mail to act in an inconsistent manner?

    MODX SMTP is set to use localhost.
    • Without seeing your FormIt snippet call, and the email chunk tpl, it's hard to try to guess what could be wrong.

        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
        Hi Susan, I guess some code would be helpful. This particular form has a large number of fields. I have other, much shorter, basic forms on other sites that work fine — I think. With this particular form, the only reason we figured out that the form email was not being sent or received, is because there is a paypal button on the response page. Thus, a payment notice would be received, but there was no email from the form.

        FormIt Call:
        [[!FormIt?
        &hooks=`spam,FormItSaveForm,email,orderRedirect`
        &formName=`webform`
        &formFields=`salutation,recipientName,bodymessage,closing,signature,addresseeName,addresseeCompany,addresseeStreet1,addresseeStreet2,addresseeCity,addresseeState,addresseeZip,addresseeCountry,returnName,returnCompany,returnStreet1,returnStreet2,returnCity,returnState,returnZip,returnCountry,senderInfo,clientName,email,specialComments`
        &emailTpl=`orderform_message`
        &emailFrom=`[email protected]`
        &emailTo=`[email protected]`
        &emailSubject=`order from: [[+clientName]]`
        &emailReplyTo=`[[+email]]`
        &validate=`email:email:required,
        bodymessage:required:maxLength=^1500^,
        addresseeName:required,
        addresseeStreet1:required,
        addresseeCity:required,
        addresseeZip:required,
        addresseeCountry:required,
        clientName:required,
        workemail:blank,
        text:stripTags`
        ]]
        
        [[!+fi.error_message:notempty=`<p>[[!+fi.error_message]]</p>`]]
        


        emailTPL:
        <h2>Contents of Order Form</h2>
        
        <h2>For The Letter</h2>
        
        <p>SALUTATION & RECIPIENT NAME: [[+salutation]] [[+recipientName]]</p>
        <p>BODY: [[+bodymessage]]</p>
        <p>CLOSING: [[+closing]]</p>
        <p>SIGNATURE: [[+signature]]</p>
        
        <h2>Envelope Return Info:</h2>
        <p>RETURN NAME: [[+returnName]]</p>
        <p>RETURN COMPANY NAME:[[+returnCompany]]</p>
        <p>RETURN ADDRESS 1: [[+returnStreet1]]</p>
        <p>RETURN ADDRESS 2: [[+returnStreet2]]</p>
        <p>RETURN CITY, STATE, ZIP: [[+returnCity]], [[+returnState]] [[+returnZip]]</p>
        <p>RETURN COUNTRY: [[+returnCountry]]</p>
        <p>INCLUDE SENDER INFO IN LETTER: [[+senderInfo]]</p>
        
        <h2>Envelope Addressee Info:</h2>
        <p>ADDRESSEE NAME: [[+addresseeName]]</p>
        <p>ADDRESSEE COMPANY: [[+addresseeCompany]]</p>
        <p>ADDRESSEE ADDRESS 1: [[+addresseeStreet1]]</p>
        <p>ADDRESSEE ADDRESS 2: [[+addresseeStreet2]]</p>
        <p>ADDRESSEE CITY, STATE, ZIP: [[+addresseeCity]], [[+addresseeState]] [[+addresseeZip]]</p>
        <p>ADDRESSEE COUNTRY: [[+addresseeCountry]]</p>
        
        <h2>Special Instructions:</h2>
        <p>[[+specialComments]]</p>
        
        
        <p>[[+clientName]]</p>
        <p>Email: ([[+email]])</p>
        
          • 19872
          • 1,078 Posts
          My current system settings are below. I have not edited them at all.
          My emailFROM address that FormIt is using is a valid email account that I created, and is part of the web hosting package.

          Mail Charset mail_charset UTF-8 —

          Mail Encoding mail_encoding 8bit —

          SMTP Authentication mail_smtp_auth No —

          SMTP Helo Message mail_smtp_helo —

          SMTP Hosts mail_smtp_hosts localhost —

          SMTP Keep-Alive mail_smtp_keepalive No —

          SMTP Password mail_smtp_pass —

          SMTP Port mail_smtp_port 587 —

          SMTP Connection Prefix mail_smtp_prefix —

          SMTP Single To mail_smtp_single_to No —

          SMTP Timeout mail_smtp_timeout 10 —

          SMTP User mail_smtp_user —

          Use SMTP mail_use_smtp No —
            • 9674
            • 170 Posts
            Hi mmcgee,

            Have you tried to call your page uncached ?
            We went into that problem recently and this solved our day.
              • 19872
              • 1,078 Posts
              Have not—but will give it a try. Thanks for the tip.
              For now I have unchecked "cacheable" on the resource. I wonder though—is it possible to just have the chunk containing my form code uncached? So instead of [[$webform]], put [[!$webform]].

              Quote from: Fildefer57 at Jan 23, 2016, 05:32 PM
              Hi mmcgee,

              Have you tried to call your page uncached ?
              We went into that problem recently and this solved our day.
              [ed. note: mmcgee last edited this post 8 years, 3 months ago.]
                • 3749
                • 24,544 Posts
                Yes, [[!$webform]] is an option in Revolution, but it could create other problems depending on how deeply nested that tag is. It's definitely worth trying.

                Does the email *ever* get sent when users click on the PayPal link?
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 19872
                  • 1,078 Posts
                  Hi Bob:

                  Thank you for responding. The form chunk is not deeply nested. It's called on the template via a snippet based on the resource id. The email from paypal has always been successfully sent and received.

                  The paypal button resides on the form response page, and is totally unrelated to the actual form. It's a pretty low-tech setup. The only reason we figured out an email was not getting sent was because the paypal receipt of payment notice would arrive via email—meaning, someone filled out the form, submitted it, clicked on the paypal button on the response page, and then made a payment.

                  Out of 15 recent form submissions, only 2 had problems.

                  Not sure whether is makes any difference or not, but this form has a lot of fields, select menus etc, and there is a snippet that determines which response page to load based on the country selected. Perhaps something is tripping up occasionally there?


                    • 19872
                    • 1,078 Posts
                    Quote from: BobRay at Jan 23, 2016, 09:06 PM
                    Yes, [[!$webform]] is an option in Revolution, but it could create other problems depending on how deeply nested that tag is. It's definitely worth trying.

                    Does the email *ever* get sent when users click on the PayPal link?

                    Perhaps the snippet calling up a specific response page based on whether US or a Foreign Country are selected in the form. This is the only form where I have this type of implementation, so maybe that's why I am only seeing an issue with this form.