开发者

PHP Sending mail issues

开发者 https://www.devze.com 2023-02-12 21:12 出处:网络
I have an application to notify \"friends\" if there is an activity on their associates\' pages. This works but after series of tests seems it se开发者_如何学编程nds to the first few people and not t

I have an application to notify "friends" if there is an activity on their associates' pages.

This works but after series of tests seems it se开发者_如何学编程nds to the first few people and not to the rest.

No errors as the script redirects to mail sent page.

Now my host provider has a limit of 500 mails per hour for an account on their platform and the email list is over 3000.

Could this be the problem? What better options do I have?

Thank you.

Currently using PHP Mail Function


It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient.

For the sending of large amounts of email, see the » PEAR::Mail, and » PEAR::Mail_Queue packages.


500 mails per hour should be the problem if your app takes that much volume. For a php server with usual configuration, mail() sends mails to local sendmail, then to local SMTP server where the host provider limits the rate. When the limit is reached, no one is on php's side to receive the error return mail.

I don't think it's hard to estimate the volume of your app. If you do need to send that many mails, consider rewrite your php function to use other SMTP server, e.g. Google Apps. Of course they come with their own limits however.

0

精彩评论

暂无评论...
验证码 换一张
取 消