General help

Emails not sent to some emails like, outlook etc

Picture of Kiran Tej Pratha
Emails not sent to some emails like, outlook etc


I am using Moodle 2.4.3. Some users are registering using,, etc. They are not getting registration emails. 

I left out the SMTP port settings blank, but other emails like are receiving the messages sent from the server

I am struck here, as users are registering but didn't receive the notification emails. 




Average of ratings: -
Picture of Matthew Spurrier
Re: Emails not sent to some emails like, outlook etc
Group Moodle HQ

Mail servers such as those used with live, outlook, gmail, et al, will be using heavy spam mitigation techniques.

More than likely, what's happening is you're sending out emails from a server that is not listed in the domain's SPF (sender policy framework) DNS entry, or potentially a DKIM (DomainKeys Identified Mail) violation, and/or does not adhere to other requirements, such as a valid PTR (reverse DNS) on the IP of the server, with a matching A record pointing back to it, etc.

There are many potential issues that could be causing the failure, however these are generally the most common, and a great place to start.


Average of ratings:Useful (1)
Picture of Ryan Diks
Re: Emails not sent to some emails like, outlook etc

I'm running into a similar issue on our Moodle platform.  Messages that are sent out with a "From" of an domain are being bounced as spam due to Yahoo's stronger DKIM policy.  I researched this issue because it started happening on a Wordpress with Getresponse forms install and the solution, along with correcting our personal DNS files was to set the FROM and REPLY-TO fields correctly.



How do I do this in Moodle?  It looks like I need to edit the class.phpmailer.php file in /lib/phpmailer, but I'm pretty useless at PHP.  Essentially, I want to add the Reply-To field into each message and hardcode the From field.

Headers from a bounced message look like this:

    SMTP error from remote mail server after end of data:

    host []: 550-5.7.1 Unauthenticated email from is not accepted due to domain's

    550-5.7.1 DMARC policy. Please contact administrator of domain if

    550-5.7.1 this was a legitimate mail. Please visit

    550-5.7.1 to learn about DMARC

    550 5.7.1 initiative. mc5si4554725obb.42 - gsmtp

------ This is a copy of the message, including all the headers. ------

Return-path: <>

Received: from gfmstaff by with local (Exim 4.82)

        (envelope-from <>)

        id 1WkmGH-0001ZQ-5J

        for; Wed, 14 May 2014 22:23:13 -0500

To: "Grant Haynes" <>

Subject: Brian  Galloway has completed 100 Questions - Unveiled at Last

X-PHP-Script: for

Date: Wed, 14 May 2014 22:23:13 -0500

From: "Brian  Galloway" <>

Message-ID: <>

X-Priority: 3

X-Mailer: PHPMailer Moodle 2013111801.01 (

MIME-Version: 1.0

Content-Type: text/plain; charset=UTF-8

Content-Transfer-Encoding: 8bit

Average of ratings: -
Floyd Saner - Tail of the Dragon, U.S. 129, NC
Re: Emails not sent to some emails like, outlook etc
Group Particularly helpful Moodlers

I agree with Matt.  I recently encountered the same problem with a client who was hosted on a shared server.  The MX TXT field was not configured properly.  Check the email error logs to see why the emails are being rejected.  Also use something like to check the server configuration.


Average of ratings:Useful (1)
Picture of Keith C
Re: Emails not sent to some emails like, outlook etc

I agree with Floyd.  Check the server logs and sent mails folder of the outgoing mailbox moodle is using.  You have to do a little digging to get the answer but it's worth it...if you don't find any bounced mails that means the server on the other side is accepting them and doing something with them.  Others might have bounced back.  You just have to find the domains that are not handling your mail the way you would like and then make adjustments on your side as needed.


Average of ratings: -
Picture of Howard Miller
Re: Emails not sent to some emails like, outlook etc
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developers

There's a lot of chat about this... culminating in... MDL-43669

Average of ratings: -