XF 2.2 Email transport method: PHP built-in mail system

Ricsca

Well-known member
By default xenforo sends emails in PHP built-in mail system, I wanted to know the limit number of emails that can be sent.

If I change to SMTP the number is based on the limits of my hosting.

Thank you
 
There is no limit on PHP's mail system. There may be a limitation set upstream of that (like when it hands off the mail to Sendmail or Postfix), but in all likelihood, the limit is going to be simply how many emails the transport system can take in (limits of the server resources). If you try to send a billion emails at once for example, you are going to run into disk i/o problems of writing that many emails to be delivered to the file system, you are also going to run into network bottlenecks trying to deliver that many concurrently, and you are also going to be CPU bound because making decisions on where to send a billion emails at the same time is going to be taxing on the server's CPU.

So even if there's no hard limit, you are going to run into practical limits. Similar to your server is not going to be able to serve up a website like Facebook, Google or YouTube on it's own even though there's nothing preventing it from trying.
 
From what I understand with the php method I don't see the "consumed" emails in my hosting while if I set SMTP I see the number of emails and my hosting gives me the limit of 500 emails per day.

I would like to contact about 8500 users without having problems so I would like to understand if it is better to use PHP or SMTP.
However, I would divide the 8500 users into 7 days so as not to send more than 1000 emails per day.
Thanks
 
Well, it's going to be dependent on your server config and if there's any artificial limits on sending email with that server. Your best option is to ask your hosting company since it's going to be specific to your server. There's no limits on PHP's mail() function, but all that's really doing is passing the email along to the server's local MTA (mail transport agent). Normally there's no artificial limits imposed at the MTA level for number of emails that could be sent, but again... would need to talk to your hosting company to find out definitively.

8,500 emails isn't all that many really. Personally, I'd send them all at once (with the limiting factor being they are sent one after the other rather than 8,500 in the same second). That should slow them down enough that the MTA can keep up.
 
From what I understand with the php method I don't see the "consumed" emails in my hosting while if I set SMTP I see the number of emails and my hosting gives me the limit of 500 emails per day.

I would like to contact about 8500 users without having problems so I would like to understand if it is better to use PHP or SMTP.
However, I would divide the 8500 users into 7 days so as not to send more than 1000 emails per day.
Thanks
Have you considered using Amazon SES which allows 50,000 messages per 24 hour period at a rate of up to 14 messages per second? There is a fee for Amazon SES, but it is a small amount.
 
There is discussion about that in this thread:
Yep... and it's a fairly good discussion... pity. The actions of some can actually come back to bite them in the arse. I personally have no great desire to help idiots (no matter that they may claim that their "language' is an impact on their "understanding" of to further their knolwldge/.
BTW, if you haven't already, grab the Amazon SES bounce add-on. Once you can get it configured, it works rather well and you don't need 3rd party bounce/unsubscribe emails.
 
Last edited:
  • Like
Reactions: GW2
Back
Top Bottom