Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,604 members, 7,809,198 topics. Date: Friday, 26 April 2024 at 04:35 AM

Cant Send Mails To Gmail Accounts - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Cant Send Mails To Gmail Accounts (1239 Views)

How To Backup Phonebook Contacts To Gmail On Android / Alert! Phishers Are Circulating This Phishing Mails To Steal Your Google Account / Helo Guys Pls How Can I Stop A Particular Website From Sending Mails To My Inbox (2) (3) (4)

(1) (Reply) (Go Down)

Cant Send Mails To Gmail Accounts by rapattorny: 3:00pm On Sep 13, 2011
Guys i need yr help here,i cant seem to send mails to gmail accounts from my website,i designed the mail form with PHP and am using the email function,i can send to yahoo accounts but Gmail accounts no show.

Please coders,i need yr help wat could the problem be.
Re: Cant Send Mails To Gmail Accounts by DualCore1: 3:06pm On Sep 13, 2011
Post the full mail() code you are using.
Is it that these mails don't get into gmail at all or they do but are in spam folder instead of inbox?
Re: Cant Send Mails To Gmail Accounts by rapattorny: 3:11pm On Sep 13, 2011
@dual core

they dont enter at all, am using mail($to,$subject,$message,$headers); and it gets to yahoo accounts but gmail none, even spam folders,it does nt enter .

hala me abeg o!
Re: Cant Send Mails To Gmail Accounts by DualCore1: 3:21pm On Sep 13, 2011
What do you have set in your headers? It could be that your IP address is blacklisted by Google or SPF records are not present or set properly in your domain's DNS.

Post your header variable.
I could also give your temporary access to server where you can upload just the mail part to check if it works on a different server.
Re: Cant Send Mails To Gmail Accounts by rapattorny: 3:32pm On Sep 13, 2011
@dualcore


$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";

$headers .= 'From: <info@himeglobal.com.>' . "\r\n";


am sending a html email with it,hence the html;charset.
Re: Cant Send Mails To Gmail Accounts by OmniPotens(m): 3:39pm On Sep 13, 2011
Check this:

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=iso-8859-2\r\nContent-Transfer-Encoding: 8bit\r\nX-Priority: 1\r\nX-MSMail-Priority: High\r\n";
$headers .= "From: $from\r\n" . "Reply-To: $from\r\n" . "X-Mailer: PHP/" . phpversion() . "\r\nX-originating-IP: " . remoteaddr () . "\r\n";
$success = @mail ($to, $subject, $message, $headers);
Re: Cant Send Mails To Gmail Accounts by OmniPotens(m): 3:44pm On Sep 13, 2011
One thing I experienced was this anyways;

If you try and it fails, try stripping \r and just use \n

example:
if (preg_match('/gmail/',$email_address))
$headers = str_replace("\r\n","\n",$headers);


REASON: To avoid Gmail thinking headers were all sent after first row.

Please test ooooo. I just pulled from my archive and pasted here.
Re: Cant Send Mails To Gmail Accounts by DualCore1: 4:01pm On Sep 13, 2011
Try that and get back to us.

Omni, long time.
Re: Cant Send Mails To Gmail Accounts by rapattorny: 4:20pm On Sep 13, 2011
ok bro,i'l try and get back to u.
Re: Cant Send Mails To Gmail Accounts by yawatide(f): 5:18pm On Sep 13, 2011
A few weeks ago, I spent about 4 hours trying to figure out why I couldn't send emails to gmail, yahoo and hotmail. As it turns out, the web host I was coding on, godaddy, had limitations for this. I was so pissed, especially after various phone calls started off with words like, "sorry, we understand your frustration but we can't help with custom scripts (as if I was calling for them to debug my script, a script that has been working on other hosts for at least 6 years!)" that I took to twitter starting a trend (#dumpgodaddy). In no time, they were responding but it was too late as I ended up switching to my "old faithful" webhost, hostmonster.

So, what web host are you using and, do you know if they support sending emails to addresses that include gmail, yahoo or msn?
Re: Cant Send Mails To Gmail Accounts by OmniPotens(m): 5:28pm On Sep 13, 2011
Dual Core:

Try that and get back to us.

Omni, long time.


You know how far na so we no suppose dey chachacha in here smiley
Re: Cant Send Mails To Gmail Accounts by utimatedes(m): 11:47pm On Sep 13, 2011
If u are using Goddady, you have made a big mistake!

Goddady is not goog for custom mail scripts except the one they gave you which does not work properly.
Re: Cant Send Mails To Gmail Accounts by yawatide(f): 12:29pm On Sep 14, 2011
utimatedes, you can say that again. Of course, I learned the hard way. Who is it that said, "never again"? That is my official motto now. At least I blast them well well for twitter cheesy

On another note, the script they have actually works well for a standard form but not for what I wanted to do (for example, if a user changes their password, I need to generate an email and send to their registered email address (which could be yahoo, gmail, etc) an email with the new password). If it were a standard email form (name, number, comments, email), I probably wouldn't have complained.

(1) (Reply)

Do You Need An Investor, A Developer Or A Buyer? / How To Make Money From Blogging. / 15years Old Nigerian creates A Social Network

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 19
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.