We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27376
    • 576 Posts
    Quote from: pixelchutes at Jan 22, 2007, 01:16 PM

    However, I invoke the eFormOnBeforeMailSent method to use eForm2db, however, eFormOnBeforeMailSent comes BEFORE the
    			if( $protectSubmit ){
    check...

    ...Should it come after??
    Use the ’eFormOnMailSent’ event and set &noemail to 1. $protectSubmit is supposed to protect against multiple mailings, or submissions, or db updates (using eForm2db). ’eFormOnBeforeMailSent’ is for events to occur before the form is actually submitted.
      • 23491 ☆ A M B ☆
      • 1,056 Posts
      @sir,

      Indeed. So, I guess what I want to know now is, when/why would you want to invoke eFormOnBeforeMailSent before if( $protectSubmit ){ .. ?
        Mike Reid - www.pixelchutes.com
        MODx Ambassador / Contributor
        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
        ________________________________
        Where every pixel matters.
        • 27376
        • 576 Posts
        Quote from: pixelchutes at Jan 23, 2007, 09:51 PM

        So, I guess what I want to know now is, when/why would you want to invoke eFormOnBeforeMailSent before if( $protectSubmit ){ .. ?
        I have no idea laugh

        I imagine it could be used to manipulate the data one last time before it’s emailed/saved. Perhaps to add a ’message id’ or check a database to make sure the data about to be submitted doesn’t exist maybe...
          • 29181
          • 480 Posts
          Hey there. I’m trying to setup eform 1.4.3 I kept getting a "mail cannot be instantiated" error with 1.4.1 so I upgraded.

          [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[(email_sender)]` &fromname='Adrian Lawley' &ccsender=`1` &tpl=`ContactForm` &report=`ContactFormReport` &gotoid=`46`!]


          is what I’m using. Before I inserted the &fromname it worked once, but used [email protected] as the reply address. I had already changed what I thought to be the email address of my domain under tools>configuration>user>email address (Here you can specify the e-mail address used when sending users their usernames and passwords.

          I placed [(email_sender)] somewhere on the page to see what it kicks out and it gave me 2 which was when I realised I need help smiley

          Any pointers please?

          Thanks in advance!
          Taff
            Adrian Lawley: www.adrianlawley.com
            • 25663 MODX Staff
            • 12,272 Posts
            fromname is using single-quotes, not back-tics.
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              and it’s [(emailsender)].
                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
                • 29181
                • 480 Posts
                Firstly, thank you both for looking!

                Quote from: rthrash at Jan 25, 2007, 08:14 PM

                fromname is using single-quotes, not back-tics.

                Thanks I must have overlooked that.

                Quote from: sottwell at Jan 25, 2007, 11:27 PM

                and it’s [(emailsender)].

                Isn’t emailsender for the contactForm and email_sender for the eform? That is how it was setup when I installed ModX?

                I tried it but still get a "Could not instantiate mail function. " Even though it now displays the correct email address. If I reset it to email_sender then it takes me to the Thank you page but not with the correct email Address.

                I deleted the following from my Contact Us page, as recommended in another thread where someone else was having the same "Could not instantiate mail function" error.

                [[Contac tForm? &sendTo=`[(emailsender)]`]]

                which doesnt seem to make a difference.

                After a while of trial and error I get emailsender to return the correct email address now. Unfortunately the email still doesn’t get sent.

                If anyone has any tips or wants to take a look the site is www.adrianlawley.com I will leave it online for a bit just in case someone can. If anyone wants a manager password, I would be pleased to give them one....

                So little hair left & so many errors smiley

                Thanks,
                Taff
                  Adrian Lawley: www.adrianlawley.com
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Sorry, was thinking you were referring to the default MODx email, as set in the site configuration.
                    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
                    • 29181
                    • 480 Posts
                    Quote from: sottwell at Jan 26, 2007, 01:41 AM

                    Sorry, was thinking you were referring to the default MODx email, as set in the site configuration.

                    It’s quite alright, any answer gets me thinking. So if I use email_sender that is the email set in the site config, the one that is used for sending out emails to registered users?

                    I take it that emailsender must be a variable defined specifically for eform then.

                    I wish I could reset it to when it worked undecided So that I could try and find the error.

                    Oh well, it will have to wait til after work.

                    Thanks again for all your help. I would be lost here without your help and the help of others. smiley
                    Taff
                      Adrian Lawley: www.adrianlawley.com
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Site settings like [(site_name)] and [(emailsender)] and [(modx_charset)] are taken from the database, and are set in the Tools -> Configuration section of the Manager. Their names are taken directly from the database field names. I’m not aware of any [(email_sender)].

                      http://modxcms.com/modx-tags.html

                      By default, unless it’s changed recently, eForm will send to [(emailsender)] without any &to being specified in the snippet call.
                        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

                      This discussion is closed to further replies. Keep calm and carry on.