4, December 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 654 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: 8269
42601 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 or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6486
39748 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 : Just a better Internet portal provided by Google
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: 6486
39748 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 : Just a better Internet portal provided by Google
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: 6486
39748 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 : Just a better Internet portal provided by Google
What's HTML?
****
Gender: Male
Posts: 408
2466 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 : Popular SEO Techniques
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?
Dec 04, 2008, 03:29:02 AM





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!





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.