Welcome Guest, Not a member yet? Register   Sign In
Strange behavior, Mail is sent successfully to Gmail but not other Email Hosts
#1

[eluser]Unknown[/eluser]
Before I begin with my question, I'll point out the source codes of two scripts I will be talking about.
My source code: http://pastie.org/490981
Codeigniter User Guide source code: http://pastie.org/490983

For some reason, my source code can send mails to Gmail accounts. However, I tried sending to other Mail servers such as Yahoo and Apple mail servers but they do not appear on either Inbox or Junk mail.

On that note, Codeigniter's script works perfectly on both Gmail and other mail servers. So what seems to be the problem?
#2

[eluser]Thorpe Obazee[/eluser]
This could be a host problem. Yahoo! Mail had issues with Hostgator for example.
#3

[eluser]Unknown[/eluser]
But it the website was able to send an e-mail using CI's script to Yahoo! Mail.
#4

[eluser]Thorpe Obazee[/eluser]
that's an example. You can check with your hosting provider.
#5

[eluser]slowgary[/eluser]
Did you use both yours and codeigniter's script to send from the same email address?? It could be due to SenderID/SPF records. A lot of domain names have an SPF record in their DNS records. SPF allows a domain to declare which IPs can send email on it's behalf. Some email providers block all mail that doesn't conform to it's own SPF record, whereas some will just throw it into the spam box (by block I mean BLOCK, no spam, no trash, no inbox).

You basically need to eliminate the similarities and figure out what was different with each code block. Did you run them both on the same server? Was the 'from' address the same both times? Did they send the same mail headers? Some email providers will also block mail if it's missing certain headers. Most give incoming mail a spam score and if it gets too high of a score it goes to spam, although certain mails may not get through at all. Looking at the code, I don't really see any differences other than the actual content sent for each field.

You code doesn't load the email helper, but I'm guessing that happens elsewhere.

If you don't have SPF set up for your domain and are unfamiliar, I would recommend googling SPF and doing a quick read. It's basically a TXT DNS record. A lot of sites will help you format the actual content of the record, wizard style. It will help you get through more spam filters and will also help people avoid getting spammed (or phished) from emails appearing to be from your domain.
#6

[eluser]slowgary[/eluser]
You could also try using the Codeigniter example code and making one change at a time, testing after each change. Then you'll see exactly what it is that's causing them to not make it through.




Theme © iAndrew 2016 - Forum software by © MyBB