Title: Mail sends twice
Last modified: October 6, 2022

---

# Mail sends twice

 *  Resolved [clausgc](https://wordpress.org/support/users/clausgc/)
 * (@clausgc)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/mail-sends-twice/)
 * Hi, I’m facing an issue with mails being sent twice and it seems people in this
   forum tried to solve this issue before ([https://contactform7.com/2019/11/26/preventing-multiple-submissions/](https://contactform7.com/2019/11/26/preventing-multiple-submissions/)&
   [https://wordpress.org/support/topic/contact-form-7-sending-multiple-emails-2/](https://wordpress.org/support/topic/contact-form-7-sending-multiple-emails-2/))
   without getting to the bottom of it.
 * **I just wonder if anybody else is facing the same issue at the time?**
    If so
   I’d like to hear how you got rid of this annoying problem.
 * FYI: The form has a redirect to a “Thank you page” but it doesn’t seem to be 
   the reason for the 2x submission…
 * _I’ve been using contact form 7 for years and never had a similar problem with
   it…_
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmail-sends-twice%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/mail-sends-twice/#post-16077325)
 * What other plugins and theme do you use on the site?
 *  Thread Starter [clausgc](https://wordpress.org/support/users/clausgc/)
 * (@clausgc)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/mail-sends-twice/#post-16096516)
 * _[@takayukister](https://wordpress.org/support/users/takayukister/) _
 * hi – I use the same basic plugins I do with several other sites – **I did find
   the issue**: a script in the header I added some months ago to “use passive listeners
   to improve scrolling performance”
 * **Below the script:**
    <script> (function() { var supportsPassive = eventListenerOptionsSupported();
 *  if (supportsPassive) {
    var addEvent = EventTarget.prototype.addEventListener;
   overwriteAddEvent(addEvent); }
 *  function overwriteAddEvent(superMethod) {
    var defaultOptions = { passive: true,
   capture: false };
 *  EventTarget.prototype.addEventListener = function(type, listener, options) {
   
   var usesListenerOptions = typeof options === ‘object’; var useCapture = usesListenerOptions?
   options.capture : options;
 *  options = usesListenerOptions ? options : {};
    options.passive = options.passive!
   == undefined ? options.passive : defaultOptions.passive; options.capture = useCapture!
   == undefined ? useCapture : defaultOptions.capture;
 *  superMethod.call(this, type, listener, options);
    }; }
 *  function eventListenerOptionsSupported() {
    var supported = false; try { var
   opts = Object.defineProperty({}, ‘passive’, { get: function() { supported = true;}});
   window.addEventListener(“test”, null, opts); } catch (e) {}
 *  return supported;
    } })(); </script>

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Mail sends twice’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [clausgc](https://wordpress.org/support/users/clausgc/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/mail-sends-twice/#post-16096516)
 * Status: resolved