Jump to content

Emails not working for gmail/hotmail, just within domain


Recommended Posts

So all of a sudden the emails are not working as they should be.

 

Email confirmations and all work fine for e-mails within the host-domain. But for customers (gmail, hotmail, etc) an email is not recieved - tried it myself too. So weird.

 

What could cause this?

Link to comment
Share on other sites

Oh, my host has a specific system where it gets stuck in their spam-filter and not sent out to "freemails" if it doesnt have this

 

 

// Generera datum och mailets id
$date = date(DATE_RFC2822);
$mid = "<" . sha1(microtime()) . "@" . $_SERVER['HTTP_HOST'] . ">";

// Ställ in rätt kodningstyp
mb_internal_encoding("UTF-8");

// Rätt kodning för avsändare och mottagares namn
$sendername = mb_encode_mimeheader($sendername);
$recipientname = mb_encode_mimeheader($recipientname);

// Sätt headers
$headers =<<<EOT
From: $sendername <$sender>
Date: $date
Message-ID: $mid
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
EOT;

// Skicka mail
$status = mb_send_mail("$recipientname <$recipient>", $subject, $message, $headers, "-f$sender");
if(!$status) {
echo "Mail kunde inte skickas.";
}
else {
echo "Mail skickat!";
}
?>

Link to comment
Share on other sites

I had the same issue. Re-installed module + reset etc & didn't work.  But then thought I'd try a different email to send to and changed it in 2 places.

 

First: Mails Alert Module - configure - change email address

Second:  Advanced Parameters - email - Under Test your email configuration - change email address.

 

Clicked Test Email and bish bash bosh it worked!

 

Now I knew it worked, and I remember reading somewhere that gmail accounts linked to domains through google apps throw up an error on your PHP server settings.

 

Then found this : https://support.google.com/a/answer/55299?hl=en

 

Contacted Host to check settings were correct etc.  They noted that the Mail routing was set to "local" in Cpanel (Not changed to "local" by me). I'm guessing they change it to something else? (It seems you can set it either: automatic/local/remote/backup) and it's all working!  RESULT! 

 

This link may help someone, or ask your host to get it sorted! 

 

https://forums.cpanel.net/threads/where-does-cpanel-store-a-domains-mail-routing-selection-automatic-local-remote-backup.449471/

 

Hope that helps someone else? Now time to finally get my site "Live!"

 

Cheers, Matt.      my shop: www.bighedz.com

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...