Results 1 to 9 of 9

Thread: Multiple confirmation emails sent

  1. #1
    Join Date
    Apr 2014
    Posts
    7

    Default Multiple confirmation emails sent

    I have been using the same form for years without any issues. Recently I am getting multiple copies of the same form submission emailed to me. I've had as many as 17 emails for the same form submission. The major change since this worked correctly is I moved from one VPS server at In Motion Hosting to another VPS server at In Motion Hosting. The way PHP runs on the new server is different from how it ran on the old server. I now have the ability to add a php.ini file to the site, where before I had to make all PHP adjustments through a .htaccess file. I'm running PHP 5.2 on the account, but have also tried 5.3 and 5.4 which didn't make a difference. I went back to 5.2 because this is the last setting that worked. I also upgraded the form mail script to the latest version, but this didn't help either. I have a feeling the issue is related to the server but have no idea how to diagnose this further. Any assistance you can provide is appreciated. Thank you, Dave.

  2. #2
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Multiple confirmation emails sent

    Hi,

    It certainly sounds very much like a server issue.

    The first step would be to install a simply test mail script and see if you get the same result.

    If so, then show the server support people and ask them to figure out their problem.

    Here's a ZIP file with the test script: http://www.tectite.com/public_downloads/testmail.zip

    Just change the email address to the one you want to test with, upload it to your server, and open it in your browser.

    Let me know how it goes.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #3
    Join Date
    Apr 2014
    Posts
    7

    Default Re: Multiple confirmation emails sent

    The script worked. I only received one email.

  4. #4
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Multiple confirmation emails sent

    Hi,

    Interesting...

    That suggests your form is specifying the same recipient multiple times.

    What's the URL for the page that contains the form? I'll take a look for you.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #5
    Join Date
    Apr 2014
    Posts
    7

    Default Re: Multiple confirmation emails sent

    It is confusing. Its hard to diagnose because its an intermittent issue. Sometimes the form works as expected. Other times I get 5, 7 or one time 17 copies of the email. I thought I had read in the forum that the form program has a built in feature that prevents the form from being sent multiple times even if someone clciks the submit button multiple times. Is this true? Here's where the form is being used: http://northcoastsealing.com/contact.php

    Right now the form is set to send the results to my client's email address. If you need me to I can change this.

  6. #6
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Multiple confirmation emails sent

    Hi,

    It looks pretty good. The fact that you have CAPTCHA means it's unlikely to be a bot sending multiple submissions.

    Please use the testmail script many times - say 10 times, and confirm that you only receive 10 emails. We need to rule out a server issue.

    The one problem I can see is that your server is *very* slow. I waited around 10 seconds for the form to complete the submit!

    This means an impatient user may click Submit again, and again. This could account for the multiple emails.

    The only way around that (except for getting a more responsive server), is to disable the submit button once it's been clicked.

    Please let me know your thoughts on the above.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  7. #7
    Join Date
    Apr 2014
    Posts
    7

    Default Re: Multiple confirmation emails sent

    I just submitted the test script as fast as I could for 15 clicks and I got exactly 15 emails. I've never noticed the latency with the site when submiting the form but I believe its possible. I'll look at the performance of the server right now. Any other ideas? Thanks, Dave.

  8. #8
    Join Date
    Apr 2014
    Posts
    7

    Default Re: Multiple confirmation emails sent

    Does the form mail program prevent multiple submissions when the submit button is clicked more than once? If not should I try adding some javascript/jQuery to disable the submit button on click? I've seen a number of different ways to do this. Do you have a preferred method that works best with FormMail? Thanks Dave

  9. #9
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Multiple confirmation emails sent

    Hi,

    Here's some code to use....

    Add this <script> element either in your <head> section or in the body above the <form> element:
    Code:
    <script>
                function disableSubmit() {
                    var elem = document.getElementById('submit');
    
                    elem.disabled = true;
                    setTimeout(function () {
                        elem.disabled = false;
                    },20000);
                }
    </script>
    Next, add the onsubmit attribute to your form tag, like this:
    HTML Code:
     <form method="post" action="http://www.northcoastsealing.com/frm.php" name="NCS Service Confirmation Form" onsubmit="disableSubmit();">
    Finally, add an id attribute to your submit button tag, like this:
    HTML Code:
    <input type="submit" name="Submit" id="submit" value="Submit" tabindex="20">
    The script disables the submit button for 20 seconds, then enables it again. You can make it longer if you wish.

    The only reason to enable it again is as a failsafe so the user gets back control after a period.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. decoding multiple emails
    By hubiedo in forum FormMailEncoder/Decoder
    Replies: 2
    Last Post: 05-Jul-2010, 09:37 PM
  2. Autoresponder only sends confirmation to allowed emails
    By izzysanime in forum Community Support
    Replies: 1
    Last Post: 15-Mar-2009, 08:14 PM
  3. send multiple emails
    By technobabbler in forum Community Support
    Replies: 4
    Last Post: 24-Feb-2009, 02:25 PM
  4. multiple emails (different domains)
    By marse in forum Bug Reports
    Replies: 2
    Last Post: 18-Jan-2008, 11:51 PM
  5. Multiple Emails
    By stewg76 in forum Community Support
    Replies: 0
    Last Post: 21-Aug-2007, 03:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •