doubledee Posted September 4, 2011 Share Posted September 4, 2011 I am using this code in my "create_account.php" script... mail($trimmed['email'], 'Re: Please Activate Your Account', $body, 'From: [email protected] <[email protected]>'); It is taking anywhere from one to several hours to receive this e-mail in my inbox?! It used to take seconds, and now takes forever. I thought it was a Gmail or SPAM issue, but I just did a test on my AT&T paid account and the same issue so far... It's awfully hard to do development and testing if I have to wait a half-a-day to get these e-mails?! Debbie Quote Link to comment https://forums.phpfreaks.com/topic/246426-emails-taking-forever/ Share on other sites More sharing options...
voip03 Posted September 4, 2011 Share Posted September 4, 2011 In most cases of delayed email, it's simply due to one of the mail servers along the way being overloaded and running slow. Quote Link to comment https://forums.phpfreaks.com/topic/246426-emails-taking-forever/#findComment-1265453 Share on other sites More sharing options...
doubledee Posted September 4, 2011 Author Share Posted September 4, 2011 In most cases of delayed email, it's simply due to one of the mail servers along the way being overloaded and running slow. Except that I can e-mail myself and get that e-mail in 1 second... And I should have mentioned that I am sending out e-mails to myself from my local MAMP/NetBeans development environment, but that shouldn't matter because the minute I call mail() it should e-mail me at gmail or yahoo or att... Debbie Quote Link to comment https://forums.phpfreaks.com/topic/246426-emails-taking-forever/#findComment-1265455 Share on other sites More sharing options...
voip03 Posted September 4, 2011 Share Posted September 4, 2011 Except that I can e-mail myself and get that e-mail in 1 second... Because it is with in the same mail server Quote Link to comment https://forums.phpfreaks.com/topic/246426-emails-taking-forever/#findComment-1265456 Share on other sites More sharing options...
darkfreaks Posted September 5, 2011 Share Posted September 5, 2011 http://www.google.com/support/a/bin/answer.py?answer=33915 have you tried setting your MX records to include google Quote Link to comment https://forums.phpfreaks.com/topic/246426-emails-taking-forever/#findComment-1265532 Share on other sites More sharing options...
flappy_warbucks Posted September 5, 2011 Share Posted September 5, 2011 Except that I can e-mail myself and get that e-mail in 1 second... Well, yes. But that's because it's the same mail server. (or clustered in the same batch) If you're not happy with mail() then write your own mail script and quit bitchin. I am sending out e-mails to myself from my local MAMP/NetBeans development environment, but that shouldn't matter because the minute I call mail() it should e-mail me at gmail or yahoo or att... Yea, read a book on Networking. And then come back when you have a clue. Quote Link to comment https://forums.phpfreaks.com/topic/246426-emails-taking-forever/#findComment-1265580 Share on other sites More sharing options...
doubledee Posted September 6, 2011 Author Share Posted September 6, 2011 If you're not happy with mail() then write your own mail script and quit bitchin. I'd be happy if you'd go away and never post in my threads again... Debbie Quote Link to comment https://forums.phpfreaks.com/topic/246426-emails-taking-forever/#findComment-1265807 Share on other sites More sharing options...
requinix Posted September 6, 2011 Share Posted September 6, 2011 PHP doesn't control SMTP servers. The issue may be as simple as a lax sendmail configuration on the web server, or it could be that there are delays from one server to another, or it could be that spam filters are playing some part in the slowdown. For the first one, ask your web hoster to troubleshoot. For the second one, that's just how it is and you can't do a whole lot about it. For the third one, don't use mail() directly and don't try to write something better yourself (because, no offense, you'll get it wrong). Use something like PHPMailer instead. And a cautionary note: If you keep alienating people on the various forums you frequent then there'll be nobody left who wants to help you. Take the criticism calmly and politely and vent your frustration someplace else. Quote Link to comment https://forums.phpfreaks.com/topic/246426-emails-taking-forever/#findComment-1266109 Share on other sites More sharing options...
doubledee Posted September 6, 2011 Author Share Posted September 6, 2011 PHP doesn't control SMTP servers. The issue may be as simple as a lax sendmail configuration on the web server, or it could be that there are delays from one server to another, or it could be that spam filters are playing some part in the slowdown. For the first one, ask your web hoster to troubleshoot. As mentioned earlier, I am sending emails locally from my development code on MAMP/NetBeans. For the second one, that's just how it is and you can't do a whole lot about it. Since this occurs on multiple email providers I don't think that is the issue, unless my repeated testing is getting me flagged as spamming myself?! For the third one, don't use mail() directly and don't try to write something better yourself (because, no offense, you'll get it wrong). I agree. Use something like PHPMailer instead. Do you think mail() could really be the issue, though? I doubt it. And a cautionary note: If you keep alienating people on the various forums you frequent then there'll be nobody left who wants to help you. Take the criticism calmly and politely and vent your frustration someplace else. Being a jack ss is always inappropriate and, no, I won't take it. People like flappy_warbucks are what ruin otherwise good threads and good websites like PHPFreaks. Being an _ss just to stir things up serves no purpose on PHPFreaks other than to stroke the insecurities of some web-wannabe... Debbie Quote Link to comment https://forums.phpfreaks.com/topic/246426-emails-taking-forever/#findComment-1266113 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.