Why Disable Emails in XenForo?
There are a couple of reasons to disable emails in XenForo.
- I use SMTP for emails on all my XenForo setups. So if I copy the backup of my live site on localhost or in the development environment, it can still connect to the SMTP server and send emails to members which can be annoying to members.
- Even if you aren’t using SMTP and have default PHP for sending emails, it is still recommended to disable sending emails on the development environment and localhost because even if your localhost isn’t configured to send emails, XenForo will try to connect and try to send an email often causing an error. This can pile up the error logs and even slow down your debug and testing environment.
How to Disable Emails using Config
Config.php file has an option to disable emails. All you have to do is add the following line of code in your config file.
And XenForo will stop sending every email to every member including admins.
All plugin emails sent via XenForo will also be stopped but if plugins send emails outside of XenForo, it won’t be stopped. One such example is a use of Sendy and using Sendy Newsletter Plugin to integrate Sendy and XenForo. Sendy is an independent email newsletter service that uses Amazon SES to send emails and doesn’t use XenForo settings.