Frank Nwoko
Frank Nwoko

Reputation: 3934

PHP Sending mail issues

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 sends 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

Upvotes: 0

Views: 296

Answers (2)

Abhishek
Abhishek

Reputation: 11

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.

Upvotes: 1

timdream
timdream

Reputation: 5922

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.

Upvotes: 0

Related Questions