CutePanda Posted October 1, 2015 Share Posted October 1, 2015 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 More sharing options...
CutePanda Posted October 1, 2015 Author Share Posted October 1, 2015 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 kodningstypmb_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 =<<<EOTFrom: $sendername <$sender>Date: $dateMessage-ID: $midMIME-Version: 1.0Content-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 More sharing options...
CutePanda Posted October 8, 2015 Author Share Posted October 8, 2015 Anyone know how to fix it? Link to comment Share on other sites More sharing options...
CutePanda Posted October 8, 2015 Author Share Posted October 8, 2015 Something weird: - The confirmation-email about the emails being sent goes to the customers gmail/hotmail.... but I dont recieve the message :S Link to comment Share on other sites More sharing options...
mexicoMATT Posted October 9, 2015 Share Posted October 9, 2015 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 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now