Jump to content

This is so weird! Using PHPmailer, I can send emails to hotmail but not gmail.


man5

Recommended Posts

Alright so I have 3 pages. Signup, Password reset and Send message. All three pages/forms email to the recipient.

 

So far my test have only been with hotmail and gmail.  

 

All emails go through for hotmail accounts. They show up in the hotmail.

 

All emails DO go through for gmail accounts. But they don't show up in the gmail. The only page that gmail is able to receive emails from is "send message". The emails derived from that send message show up in gmail.  The other two don't.

 

There are not errors on the server side that show up. It clearly shows emails being sent.

 

Does anyone have a clue why this is happening?

Edited by man5
Link to comment
Share on other sites

Well I figured out what the problem is.  Google is blocking my email from sending to that person.  I tried a hotmail email as a sender's email and it did go through.

 

I have a domain and hosted on a server(bluehost). I am using the free email service that comes with it.  I guess it would look spamy to google if coming from these free email service, even though it's a real email(info@mydomain.com).

 

Is there an alternative solution to this, as oppose to paying monthly for improved email service?

Link to comment
Share on other sites

as a sender's email

 

 

the emails are being sent FROM your mail server at bluehost. the domain in the from address needs to correspond to the sending mail server, i.e. you have set up dns zone records under your account that the receiving mail server can use to confirm that the sending mail server where your domain is hosted at IS where the mail should have been sent from.

 

if you want to include the sender's email address, for reply purposes, you put it into a Reply-to: mail header, not the From: header.

Link to comment
Share on other sites

There is no message from google why they are blocking it. The email simply never shows up, while in hotmail it shows up.

 

I have checked the DNS Zone Editor on bluehost.  It list 5 hosts. 4 have the same ip address and local has it's own ip.

 

Here is part of phpmailer

$mail->IsSMTP();                                      // Set mailer to use SMTP
$mail->Host = '234.456.789.562';
$mail->SMTPAuth = true;                               // Enable SMTP authentication
$mail->Username = 'info@mydomain.ca';              // SMTP username
$mail->Password = 'pass123';                    // SMTP password
							
$mail->From = 'info@mydomain.ca';
$mail->FromName = 'mydomainname';
							
$mail->AddAddress($recipient_email);        

Initially I was using the localhost ip(127.0.0.1) for host above and it will still sending emails. Now I switched to the mail ip and it's still sending emails; but again not to gmail

 

I should also mention that on my send_message.php page, a non registered user is sending an message to a registered user's email that's in the database.  The member I am testing it on has a gmail account and the email goes through. 

 

It's just that on signup and reset password page, that same gmail email won't receive an email. Weird.

 

 

ps. my domain ends iwth .ca. So it's info@mydomain.ca.   

Edited by man5
Link to comment
Share on other sites

Well on bluehost there are two kinds of logs. Error logs and access logs.  I don't seen any errors regarding mail, except for this.

Account has exceeded the max emails per hour allowed, referer: http://swiftfm.com/?p=2121#comment-84388  

I doubt that's the issue for why the emails are not going to gmail.

 

I do not receive any bounced back emails from google. They emails are sent perfectly with no error returns.  They just never show up in gmail. 

 

The issue is definitly the free email service of bluehost. I read somewhere that Google back listed Bluehost.

Link to comment
Share on other sites

Ah, so you don't have access to the actual mail logs, which is most likely where the bounce notice from gmail would be.

 

It doesn't make sense that gmail is blocking bluehost if you are able to send to gmail from the send_message.php but not your other pages. Presumably these are all being sent via bluehost.

 

We use SendGrid with a unique IP for outbound emails and it works great. You're not at the mercy of your hosts IP reputation. If 500 different domains are sending through Bluehost and some of them are bad/spammy/fishing/etc, it could affect delivery of everybody else. We send about 4,000 emails/day without issue. Once in a few months there will be a problem with a specific domain that we can get resolved directly, but google will be NO help to you unless you have a business account. They'll just point you to about 10 huge webpages of info and tell you to make sure your emails are in compliance with their rules.

 

Here's some good info: http://www.rackaid.com/blog/gmail-blacklist-removal/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.