• Skip to main content
  • Skip to primary sidebar

xfpoint

XenForo Resource Site with Tips, Tricks and Hacks

  • Home
  • About
  • Glossary
  • Guides
  • Tutorials
  • Add-ons
  • Contact
You are here: Home / Guides / How to Disable Emails Completely in XenForo

How to Disable Emails Completely in XenForo

October 11, 2017 by Shabbir Bhimani

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.

<?php
//* Do NOT include the opening php tag above. Copy the code shown below.
$config['enableMail'] = false;
view raw config.php hosted with ❤ by GitHub

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.

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)

Filed Under: Guides Tagged With: Config.php, Configuration, Disable Email, Email

About Shabbir Bhimani

xfpoint.com is an independent XenForo resource site with tips, tricks, hacks, and resources for new XenForo webmasters to improve their community. Read More…

Primary Sidebar

About Shabbir Bhimani

xfpoint.com is an independent XenForo resource site with tips, tricks, hacks, and resources for new XenForo webmasters to improve their community. Read More…

© xfpoint 2025. xfpoint.com is an independent XenForo resource site for new xenForo webmasters.

Copyrighted code samples of XenForo will be visible only if you have a valid xenForo license.