24, July 2008

php mail() sometimes sends multiple emails to same person - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: php mail() sometimes sends multiple emails to same person
« previous next »
Pages: [1] Print

Author Topic: php mail() sometimes sends multiple emails to same person  (Read 298 times)
Sandwich Artist
*
Posts: 25
186 credits
Members referred : 0


« on: Apr 22, 2008, 11:45:10 PM »

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.
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7975
40807 credits
Members referred : 3



« Reply #1 on: Apr 23, 2008, 10:24:26 AM »

Looks like a problem of the mail server. Have you checked that?

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6280
38506 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Apr 23, 2008, 10:36:51 AM »

or the mail server from receptionist, I know that hotmail and other free provider have this problem


Last blog : 4th of July Lottery from TemplateMonster.com
Sandwich Artist
*
Posts: 25
186 credits
Members referred : 0


« Reply #3 on: Apr 23, 2008, 05:08:49 PM »

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. 
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6280
38506 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: Apr 23, 2008, 05:19:58 PM »

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


Last blog : 4th of July Lottery from TemplateMonster.com
Sandwich Artist
*
Posts: 25
186 credits
Members referred : 0


« Reply #5 on: Apr 23, 2008, 09:25:29 PM »

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.
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6280
38506 credits
Members referred : 374


It's time to use PHP5!


« Reply #6 on: Apr 23, 2008, 10:22:24 PM »

Your problem is absolutely NOT related to the php function (check your mail server settings)


Last blog : 4th of July Lottery from TemplateMonster.com
So if I press Alt F4... What?
****
Gender: Male
Posts: 394
2382 credits
Members referred : 2



« Reply #7 on: Apr 28, 2008, 08:43:19 PM »

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.


Last blog : Pagerank 0, the new Leprosy ?
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7704
Tags : php mail Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: php mail() sometimes sends multiple emails to same person
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Jul 24, 2008, 10:17:43 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 35.717
Total Topics: 7.379
Total Members: 3.710
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: prolist

45 Guests, 3 Users online :

10 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.