Sublime directory Surf the web anonymous Pagerank Monitor


php mail() sometimes sends multiple emails to same person

msthac01
Tue 22 April 2008, 11:45 pm GMT +0300
This is kind of weird to me as to what's going on. Basically sometimes when our php web app sends out emails to our employees about the files they're working on, they will occasionally get anywhere from 2-10 of the email come through.  The really weird thing is that they may come 1 every 10-15 minutes or so for an hour or two or more.  What can cause this to happen, because the same emails only go one time to some people and multiples to others?  Any ideas on what I should look at or anymore info you need to help.  Any help is greatly appreciated.

Nikolas
Wed 23 April 2008, 10:24 am GMT +0300
Looks like a problem of the mail server. Have you checked that?

olaf
Wed 23 April 2008, 10:36 am GMT +0300
or the mail server from receptionist, I know that hotmail and other free provider have this problem

msthac01
Wed 23 April 2008, 05:08 pm GMT +0300
Well our email is hosted by an outside company, what kind of server problem could cause something like this?  I have a feeling they are going to keep saying that its something in my php code and not the server.  That seems to be the case most of the time, though I've went through my code over and over again looking for something that could potentially trigger multiple emails but have been unable to find anything at all. 

olaf
Wed 23 April 2008, 05:19 pm GMT +0300
Well our email is hosted by an outside company, what kind of server problem could cause something like this?  I have a feeling they are going to keep saying that its something in my php code and not the server.  That seems to be the case most of the time, though I've went through my code over and over again looking for something that could potentially trigger multiple emails but have been unable to find anything at all. 

start simple, create a mail script only with this example:

<?php
$to      
'nobody@example.com';
$subject 'the subject';
$message 'hello';
$headers 'From: webmaster@example.com' "\r\n" .
   
'Reply-To: webmaster@example.com' "\r\n" .
   
'X-Mailer: PHP/' phpversion();

mail($to$subject$message$headers);
?>


if the mail is still send twice you can show this your mail provider

msthac01
Wed 23 April 2008, 09:25 pm GMT +0300
I used that simple example email and would go to the page, wait for the email to come through then give about 30 min to see if another came, then alter the email by adding another word to the subject so I would know it wasn't the last email I had sent, then resend again.  So far I've sent myself 7 emails and still have yet to receive a duplicate.  Yet I was just talking to one of the other employees and they showed me where they had received an email this morning and then the same email again and again about every 15-20 min for 2 hours.  Just weird to me, don't understand what could be going wrong.

olaf
Wed 23 April 2008, 10:22 pm GMT +0300
Your problem is absolutely NOT related to the php function (check your mail server settings)

GiorgosK
Mon 28 April 2008, 08:43 pm GMT +0300
I have had a double email problem lately and it turned out that the spam filter was at fault.

The hosting compny explained that it can happen with that particular spam filter when server is slow
I can't remember the exact technical details why it happened.

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional