email delivery problem

I'm having trouble getting email delivered to my gmail and yahoo accounts using both elgg 2.3.10 and 3. I've used the test script from and it gets through to my gmail and yahoo accounts but my elgg site emails don't. I'm using a godaddy vps which has to use a relay server to forward the emails. My mta gets them to the relay and they are accepted but disappear after that. Any suggestions would be greatly appreciated!

test script email that makes it through (user names are obfuscated):

Received: by 2002:a4a:dd0e:0:0:0:0:0 with SMTP id m14csp220547oou;
        Sun, 24 Feb 2019 15:17:17 -0800 (PST)
X-Google-Smtp-Source: AHgI3IbsKgCJAc7nB6gNHq0kTV4kjRfnmyixi84kfAmCpP2mgvf/SBx4Bu6g7TbWmmt82y7kPYCG
X-Received: by 2002:a24:7649:: with SMTP id z70mr7389063itb.63.1551050237159;
        Sun, 24 Feb 2019 15:17:17 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1551050237; cv=none;; s=arc-20160816;
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;; s=arc-20160816;
ARC-Authentication-Results: i=1;;
       spf=pass ( best guess record for domain of designates as permitted sender);
       dmarc=fail (p=NONE sp=NONE dis=NONE)
Return-Path: <>
Received: from ( [])
        by with ESMTPS id o10si3470804ito.45.2019.
        for <>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 24 Feb 2019 15:17:16 -0800 (PST)
Received-SPF: pass ( best guess record for domain of designates as permitted sender) client-ip=;
       spf=pass ( best guess record for domain of designates as permitted sender);
       dmarc=fail (p=NONE sp=NONE dis=NONE)
Received: from ([]) by : HOSTING RELAY : with ESMTP id y30JgzJsvEdBdy30Jgu6UT; Sun, 24 Feb 2019 16:16:15 -0700
Received: from xxxxxxxxx by with local (Exim 4.91) (envelope-from <>) id 1gy30E-0001cX-0G for; Sun, 24 Feb 2019 18:16:10 -0500
Subject: Test email.
X-PHP-Script: for
X-PHP-Originating-Script: 501:test_email.php
Message-Id: <>
Date: Sun, 24 Feb 2019 18:16:10 -0500
X-CMAE-Envelope: MS4wfK5ZlFkfaA6DnbB+mTm+CrX0xmbGiRwPPOXZXyXMnftKDbqcS8xvhdbH6L1OAneq+/aALHWyRPZWal7EhacRoUpJ4GopmoqUzVk7ih2C2DckeUGhGHBv hexdJbr2DsOiEgURS+acXBBQXfH3+rl71ygcJRv8bvBBRtdgk6PlexPDlmLG05cLE/dDUZLZmd2nJgkNHdXEQC8na5sAJyh/Jb4ilWF2odPTlRVrSMYhZYzQ

If you can read this, your email is working.

test script log from my server:

2019-02-24 18:16:10 cwd=/home/thenudeme/public_html 3 args: /usr/sbin/sendmail -t -i
2019-02-24 18:16:10 1gy30E-0001cX-0G <= U=xxxxxxxxx P=local S=571 T="Test email." for
2019-02-24 18:16:10 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1gy30E-0001cX-0G
2019-02-24 18:16:15 1gy30E-0001cX-0G => R=send_to_smart_host T=remote_smtp [] C="250 2.0.0 y30JgzJsvEdBd mail accepted for delivery"
2019-02-24 18:16:15 1gy30E-0001cX-0G Completed
2019-02-24 18:21:16 SMTP connection from []:53518 (TCP/IP connection count = 1)
2019-02-24 18:21:16 SMTP connection from (localhost) []:53518 closed by QUIT

log from elgg sending email that doesn't get received by gmail:

2019-02-24 18:31:51 cwd=/home/thenudeme/public_html 4 args: /usr/sbin/sendmail -t -i
2019-02-24 18:31:51 1gy3FP-0001gk-Tf <= U=thenudeme P=local S=1027 id=/ T="Test please confirm your email address for The Nude Me!" for
2019-02-24 18:31:51 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1gy3FP-0001gk-Tf
2019-02-24 18:31:57 1gy3FP-0001gk-Tf => R=send_to_smart_host T=remote_smtp [] C="250 2.0.0 y3FVgzSO1EdBd mail accepted for delivery"
2019-02-24 18:31:57 1gy3FP-0001gk-Tf Completed

  • In elgg-config/settings.php there's the config option $CONFIG->broken_mta. You could try if it works with setting it to true. But I'm not sure it helps. As you say yourself, the MTA on your server seems to forward the mails correctly to the relay server. So, the problem might be rather a config issue on the relay server or restrictions regarding the from email address allowed.

    Looking at the log I think you do the test wth a @gmail email address while the emails sent from the Elgg site are NOT from a @gmail address (site email apparently is not a gmail address). I would think the problem is that the relay server (google/gmail?) is not accepting to forward any non-gmail addresses. I don't know if you could change this in the gmail account settings. The other options would be to use a gmail address as site email address which might then be accepted with regards forwarding the mails on the replay server. Or try getting a proper mail server set up on your VPS that doesn't require the relay server but sends the mails directly. Last option would be using a plugin that would send mails from Elgg via SMTP. Unfortunately, there might not be a plugin available that works on Elgg 2.x versions of Elgg (the existing plugins like and haven't been updated since quite a long time). Maybe also has the functionality of sending mails via SMTP included but that would be something you have to try yourself.

  • Thank you for the reply. Setting broken_mta=true didn't help and godaddy requires using a relay for all outbound mail. I have set up an account with sendgrid so I'll see if I can't get a plugin to work with that. Thank you.

  • So, because I know soooo many people suffer from this I thought I'd share that progress has been made. I have successfully set up sendgrid to relay my emails from my godaddy vps to my gmail test addresses. However, they are deposited into the spam folder and my yahoo tests don't show up at all. I've setup spf, dkim, and dmarc in my dns to hopefully make it to the inbox but even that doesn't seem to be working - still in gmail spam folder and no sign of emails in yahoo. I figure I need to make my emails CAN-SPAM compliant which means I'll need to alter the information sent in them. Can someone point me in the direction of what I need to do to accomplish this? I don't see a plugin for 2.x and I would prefer to use 3 as this is just a hobby site.

  • If you get the mails at least in the spam folder of gmail check the full email header to find out why it got marked as spam. With some luck the reason is noted in the header. I have to admit I can't completely comprehend the problem not knowing about what setup is necessary to be able to send mails from a godaddy VPS instead of just using the an on-server MTA like any VPS on any other webhoster would probably offer. Maybe the problem with all the validation methods (SPF etc.) not working is that the email address domain (FROM) does not match the domain sending the mail violating the origin policy. Or the IP address of the sending server is just blacklisted (check for example at spamhaus) as this seems not unusual for IP addresses used by godaddy...

  • Thanks for the suggestion RvR, looks very helpful. It still seems odd that I was able to use the test_email.php script and the email could go through godaddy's relay and land in my inbox while the emails constructed by elgg ended up not being delivered at all. I just ran the script again through sendgrid and the test script email landed in spam. There are so many variables with this email stuff but I'm learning alot and determined to get this working. Next stop - Postmaster Tools...

  • Team,

    can u please help me out to send email by gmail account .We are also planing to send email but not have hosting server yet.

    Want to test the things by gmail prior to this.

    pls help