Skip to content
Advertisement

PHPMailer sends the same email twice

I am using PHPMailer to send emails from a PHP file.

Here you have all the code for it:

JavaScript

And here is how am I calling the php_mailer function:

JavaScript

My issue is that PHPMailer is sending every email twice.

Advertisement

Answer

I suspect your browser is sending repeated requests due to a plugin. This is not an unusual problem; there is an article about it in the PHPMailer wiki. Try turning off plug-ins and appending random numbers to your subject line, or check your web logs for the repeated requests to be certain.

While I’m here, would you find a PHPMailer video course useful? I’m thinking of creating one and I’m trying to gauge interest.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement