• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Send email to users


I use "Email Users" feature in admincp to send email to all users, total 40,360.

When sending email to 9,090, the page "Sending email...." stop loading. I was wondering if the email still sending underground until it sent email to all users? Is there a way to check how many emails were sent?

Thank you.


XenForo developer
Staff member
It doesn't send in the background. If the page doesn't load, then it won't send any more email. There isn't really any logging of the sent emails.

Are there any server errors logged?
Check "Error Log" in cPanel:

2014-02-20 03:05:33.269 [NOTICE] [/..../.htaccess:8] Unsupported ErrorDocument URL: default, must start with '/' or 'http'.

But it's the same as some old message (caused by litespeed I think!), not new.

Can you please suggest a way to fix it? For sending small amount of message there have no error!



XenForo developer
Staff member
I was thinking more of any errors in the XenForo control panel.

I don't have a particular recommendation. In general, each page shouldn't really vary from each other (though there will be some variations based on the query). If you're using an external SMTP server to send mail via XF, I would generally recommend using the local "default" system -- it tends to be faster and more resilient.

Does the page take a while to load? If so, your server could be timing out and killing the request. Extending any server timeouts may be worthwhile.
The page keep loading while email is sent out, around 200 emails sent out each time.

I contacted the host and they increased PHP execution timeout to 20 minutes and they asked:

  • Do you think that gives your script enough time to run?
  • Can you let me know exactly where I can see where this script is executed so I can test its execution?


XenForo developer
Staff member
I'm presuming that it's a timeout - normally there would be more error logged indicating that. I wouldn't expect it to take an incredibly long time unless the query was being particularly slow or the emails were being sent by an external server (and the connection there could be slow).

It should only be sending 30 emails per page. (It's only possible to reduce that by editing the code.)


Well-known member

I experienced the same and maybe this will help you a little bit: I am sending regularly emails to users (around 30.000 each time). In the browser window, it adds always in steps of 30. So you see actually how many emails are sent in real time. The browser refreshes at the same time always.

Sometimes after 5000, sometimes after 9000, it stops and the browser shows an error (time out). I then wait one minue an hit the "back" button of the browser. It then continues to send emails and as far as I can see according the numbering in the browser window, it continues exactly at the point it stopped before. So no double emails.

So I need 4-6 times to refresh the browserwindow to get all emails send. Not an elegant solution, but better than nothing.

Bear in mind it is important that you do NOT log out inbetween or hit refreh or do something else with the browser window.

But it would be great if in a future version, we could finetune the sending of emails even more so that also users of shred hosting packages do not get time outs. It is a waste of time sitting an hour in front of the pc and waiting for the next time out ;)


Active member
It should only be sending 30 emails per page. (It's only possible to reduce that by editing the code.)
It would be nice to know how.

I'm having this issue:
I am using [bd]Mails with Mandrill, and when I am sending an email down to our 80K members, I get a script time out error several times which forces me to sit in front of my computer the WHOLE time waiting so I can refresh the page when I get the error so that I don't have to start over, because it does not have a way to let you pick up where you left off, and I do not think people want to get 10 emails from me saying the same thing...

So is there a way to increase the amount of emails being sent in a batch? We send via Mandrill, so they manage the queue. I would like to send between 100-200 per batch if possible so that I did not have to spend 2-3 hours sitting in front of my screen for no reason! (experience copied and modified from here).

Thanks in advance @Mike