b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Back-office Reference
  3. Emails
  4. Troubleshooting
  5. Emails don't arrive / Email notifications don't work

Emails don't arrive / Email notifications don't work

b2evolution will send emails in a number of occasions:

  • a user wants to register
  • a user forgot his password and requested a new one
  • a user wants to contact the admin
  • a user wants to contact another user

If you are not receiving these email notifications you may want to do the following:

Check your Spam folder

First things first: have you checked your spam folder? (especially if you’re using Gmail which is extremely aggressive on qualifying anything with an "unsubscribe" link as spam…)

Check that b2evolution actually sends the emails

In case you doubt that b2evolution actually sends out the emails, you can very easily see ALL the emails that b2evolution has sent.

In the back-office, navigate to Emails > Sent.

This shows ALL the emails that b2evolution has tried to send. It also shows whether or not the system accepted the emails or not.

  • If b2evolution doesn’t even try to send the emails, you need to look in b2evolution’s configuration. For example:
    • Start by setting notifications to "Send immediately" here: After each new post or comment…
    • Make sure your test users accept to receive more than the default of 3 messages per day here: Receiving Notifications Panel
  • Once you see the email has actually been sent by b2evolution, you need to look in the server setup what makes the emails not being sent. See below.

Check if your web host is blocking outbound email

b2evolution uses PHP’s mail() function to send these emails.

Some hosting providers, however, disables this function for security (spam) reasons. Usually, if this is the case, your b2evo will show a warning message alerting you of the situation. Before trying something else, you should double-check that the email output is enabled in your server by using the script below:

<?php
    $to      = 'nobody@example.com';
    $subject = 'the subject';
    $message = 'hello';
    $headers = 'From: webmaster@example.com' . "\r\n" .
        'Reply-To: webmaster@example.com' . "\r\n" .
        'X-Mailer: PHP/' . phpversion();
    $additional_parameters = '-r webmaster@example.com';

    mail($to, $subject, $message, $headers, $additional_parameters);
?>
  1. Replace "nobody@example.com" in the script with an email address that you have access to.
  2. Upload the script to your server (via FTP or edited directly in a new file).
  3. Execute the PHP script on command line or directly at your browser.
  4. You should receive the email.

If you receive this sample email in your inbox, we can rule out the server configuration as a possible cause and continue with our investigation. Maybe, you should check the email notification settings for each feature.

Check the params being passed to the mail() function

In b2evolution 6.7.5+, see: PHP mail() Function Settings.

In older b2evolution versions, see the following:

On some web hosts, the defaults params that b2evolution passes to the mail() function will not be accepted. You can tweak them to some extent with the $sendmail_additional_params variable you will find in the _advanced.php configuration file. The default setting is $sendmail_additional_params = '-r $return-address$';.

If sending email results in errors (red dots in the "Sent emails" log), try these variations (in the following order):

  • $sendmail_additional_params = '-f $return-address$';
  • $sendmail_additional_params = '-r $return-address$ -f $return-address$';
  • $sendmail_additional_params = '';

If one of these variants works, please be so kind to leave a comment below with the name of your web host and the variant that works for you. Thank you!

Configuring an SMTP Gateway

If you can’t get PHPs built-in mail() feature to work as expected (generally due to limitations of your webhost), you will need to configure an SMTP Gateway which can be locally provided by your webhost or be a remote SMTP Server that you are allowed to use (you will typically need a username and password). This could be the server of your normal cloud email account (Gmail, Yahoo!, Fastmail, etc.)

You can set up an SMTP Gateway in the SMTP Gateway.

Created by fplanque • Last edit by winskie on 2019-08-14 06:50 • •

1 comment

Comment from: fplanque

User Report: ICDsoft hosting requires -f

2016-07-08 @ 14:32

On this page

  • Check your Spam folder
  • Check that b2evolution actually sends the emails
  • Check if your web host is blocking outbound email
  • Check the params being passed to the mail() function
  • Configuring an SMTP Gateway

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
    • Site
    • Collections
    • Files
    • Analytics
    • Users
    • Messages
    • Emails
      • Email Lists
      • Campaigns
      • Automations
      • Settings
      • Sent
      • Returned
      • Addresses
      • Troubleshooting
        • Return-Path Processing Overview
        • Email Deliverability
        • Emails don't arrive / Email notifications don't work
      • Plugins Settings
    • System
    • Working with Results Tables
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
CMS + forums

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque