Current location: Hot Scripts Forums » Programming Languages » PHP » Too many mail() function calls


Too many mail() function calls

Reply
  #1 (permalink)  
Old 11-16-09, 03:52 AM
3Nex 3Nex is offline
Newbie Coder
 
Join Date: Sep 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
X_X Too many mail() function calls

When I send newsletters from my CMS, many of them never get delivered even though mail() function returned 1. I'm just assuming that's server's anti-spam precaution which is only logical and most likely. How do I get around that, is it possible to create a cron job from my PHP script? Or is there an even better way?

Thanks.

Last edited by 3Nex; 11-16-09 at 03:54 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-16-09, 04:55 AM
urstop urstop is offline
Newbie Coder
 
Join Date: Dec 2007
Location: London
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
If your server is blocking it as spam, then putting the script in the cron will not help.

Also, did you check the email ids that are not getting delivered. Are these Ids valid, many mailing lists have Ids which are no longer in use.
__________________

.NET Software Freelancer UK
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 11-16-09, 05:48 AM
3Nex 3Nex is offline
Newbie Coder
 
Join Date: Sep 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by urstop View Post
If your server is blocking it as spam, then putting the script in the cron will not help.
I forgot to mention, I was thinking of a cron which would send like 50 e-mails every 10 minutes or so.


Quote:
Originally Posted by urstop View Post
many mailing lists have Ids which are no longer in use.
The whole mailing list code is mine. And I don't know if I can get the information is an e-mail delivered in any way, because the mail() function returns 1 for every sent mail (in this case - every mail).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 11-16-09, 12:18 PM
3Nex 3Nex is offline
Newbie Coder
 
Join Date: Sep 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Never mind, I got it!!!

I'm gonna make a cron job that calls a function for sending e-mails every 10 minutes no matter what. Then when I choose to send newsletter from the CMS, I will only put all the subscribers' emails (and newsletter id's) in a table. Then, when my cron job executes, it will send and delete first 50 e-mails. In 10 minutes another 50 e-mails etc... When the table with "newsletters to do" is empty, cron will simply do nothing.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

Tags
mail, mailing list, overload, spam


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Send mail authentication sujata_ghosh Perl 9 06-24-08 01:45 AM
Attachement help needed sujata_ghosh Perl 18 06-22-07 02:00 PM
ASP upload prob minority ASP 1 06-27-05 09:35 AM
PHP Error Fairnie PHP 8 06-26-04 08:15 AM
Help trim code down TheLaughingBandit JavaScript 0 09-02-03 10:50 AM


All times are GMT -5. The time now is 06:52 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.