Maximum number of email addresses used in “$to” parameter when sending PHP mail?

隐身守侯 提交于 2019-12-11 19:15:29

问题


While I believe that there is no actually declared limit and the number of mail recipients of php mail() function is theoretically unlimited, I also believe that, from your experience, there is some maximum number that should be not be passed over in order to send php mail that will not end up in junk folder.

What is that number?

My task is to send approx 2000 important notification emails to organisation's partners.


回答1:


Most web hosting companies will limit you to about 100 (per hour I believe). Check with your host.




回答2:


  1. Send out one email per recipient, that's how they will be delivered anyway. Unless you have specifically configured this particular mail server to accept a squillion recipients in a single message you're very likely to have the message rejected by the server. Additionally, messages with too many recipients are just begging to be filtered as spam.

  2. As @relentless mentioned, you should also check with your host about what their bulk mailing policy is. The last hosting company I worked for limited the frequency of mailing to 100 every 5 minutes, or one every 3 seconds.

  3. Also, catch the return value of your mail function to see if the message submitted successfully. I don't know how many angry people I talked to about their horrid bulk mail scripts because they never bothered to look at the return of the mail() functions.

  4. Set a header for Return-Path: <bounced@yourdomain.com> and actually check your bounces and remove addresses. If you don't you're going to get marked as a spammer.

  5. Include some option to request to be removed from the mailing list, and honor all requests. If you don't you'll be marked as a spammer, and someone will send an angry email to abuse@yourhostingcompany.com which can potentially get your account suspended/terminated depending on how much they care about their email system's reputation.

  6. Check the reputation of your host's outbound mail server. If it's on too many big lists your email won't get through.

  7. Don't send an email loaded down with spammy keywords like 'buy', 'payment', 'cheap', 'penispills', etc. I've seen many well-intentioned newsletter/notification emails that are filtered based on content simply because the the writer was unable to objectively look at the words they were using.

or just consider using a reputable mailing service like ConstantContact that takes care of all of this garbage for you.




回答3:


Cron is a better idea here because max_script_exec_time will probably get in your way here too. A better approach is making a list of recipients and then use Cron and a PHP Script to process them until the list is empty. Have a look at this here



来源:https://stackoverflow.com/questions/14389504/maximum-number-of-email-addresses-used-in-to-parameter-when-sending-php-mail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!