We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I'm glad I could help. Thanks for reporting back, and for the kind words. smiley
      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
      • 36551
      • 416 Posts
      Is it possible to have two email addresses for each choice?

      When I do this in the contacts.cfg.php, I get a "invalid recipient"

      Please choose a recipient: Please choose a recipient:
      General Inquiries: General Inquiries: [email protected], [email protected]
      Administration: Administration: [email protected], [email protected]
      Press & Media Inquiries: Press & Media Inquiries: [email protected], [email protected]

      The form is working with only one address for each choice.

      # $Revision: 106 $
      # Version: 1.0.3
        • 3749
        • 24,544 Posts
        It should work, but it doesn't. Back in the dark ages when I did the code, I foolishly chose to use a comma to separate the various recipient options. I should have user ||. Then this would probably work:




        If you feel like living dangerously, try changing line 158 of the spformproc.class.php file from this:

        $recipientArray = explode(',',$recipientArray);



        to this:

        $recipientArray = explode('||',$recipientArray);



        Then change line 312 of the nearby spform.class.php file from this:

         $this->spfconfig['recipientArray'] = explode(',',$ra);


        to this:

        $this->spfconfig['recipientArray'] = explode('||',$ra);



        Then change the format of the recipientArray property as described at the beginning of this post.

        Be prepared to revert all the changes if it doesn't work. wink
          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
          • 36551
          • 416 Posts
          Thank Bob

          I'll run it past my client. It's their busy season so they may want to wait before trying this. They have a work around in place for now.

          I assume this would be over written with any upgrade of this extra?
            • 3749
            • 24,544 Posts
            Quote from: terrybarth at Aug 24, 2016, 02:44 PM
            Thank Bob
            I assume this would be over written with any upgrade of this extra?

            Actually, I don't think so. If it works, I'll probably build it into the next release.
              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
              • 36426
              • 197 Posts
              Hi Bob, sorry to bother you. I also seem to be having a problem with "Unauthorized Access in spformproc"

              I have the emailsender set in Settings. The correct www. and non-www domain formProcAllowedReferers (I even tried adding http:// entries in there too but took them out again when it didn't seem to help).

              I'm running Revo 2.5.1 with spform 3.3.0-pl.

              I don't have 'requireVerify' enabled on spform so there is no captcha. But I do have captcha enabled in System settings for manager logins.

              I wonder if you could please help me to get the form working. What is odd is that it sometimes works on some browsers or phones and doesn't on others when trying combinations of different www. or not addresses. Also the form is on the homepage as well as other pages if that makes any difference? But the thank you page is always the same resource.

              Thanks again for any help. smiley
                Yorkshire UK based hosting provider: https://www.simulant.uk
                • 3749
                • 24,544 Posts
                I'm assuming that your emailsender is an email address more than 5 characters long, so that leaves a session issue as the problem.

                When a user comes in on a www URL and gets transferred to a non-www URL (or vice versa), the session data is lost.

                Make sure you uncomment one (but not both) of the sections in the root .htaccess file that forces www or non-www addresses.
                  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
                  • 36426
                  • 197 Posts
                  Thanks Bob that seems to have fixed it. Many thanks!
                    Yorkshire UK based hosting provider: https://www.simulant.uk
                    • 3749
                    • 24,544 Posts
                    I'm glad that worked. Thanks for reporting back. smiley
                      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
                      • 40400
                      • 3 Posts
                      Got an error like "Form is sent from an invalid server referer (http://www.xxxxx.tld/yyyyy.html)".

                      Your sollution was:
                      Check the &formProcAllowedReferers property of the snippet tag. Make sure it includes your server (yoursite.com,www.yoursite.com).
                      Also, check the emailsender System Setting and make sure it's an address at your own server.

                      Your solution did not work, the same error occur. I disabled SMTP email. The mails are sent from the same server with phpmail.
                      i tried to change the standard Configuration of the Snippet. Also added the option in the chunk. Nothing is working.

                      [[!SPForm? &useHiddenField=`1` &formProcAllowedReferers=`http://www.xxxxx.tld,http://xxxxx.tld,http://www.xxxxx.tld/yyyyy.html,www.xxxxx.tld,xxxxx.tld`]]