Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

GMail/Yahoo/Hotmail users cannot receive emails


Guest

Recommended Posts

Posted

Hi all,

 

I am an osCommerce Newbie and my question is the following. It seems that in my shop, all emails are sent correctly (tell_a_friend, password_forgotten, create_account etc,) except when the recipient has a GMail/Yahoo/Hotmail account. Those emails do not arrive. Is anyone familiar with this problem? I know it sounds weird, but i've tested Hotmail accounts, Yahoo accounts, and GMail accounts. I might be that all free email accounts treat these kind of emails as spam and filter them immediately?

 

Thanks for the support!

Posted

The most likely cause is that your host loves to take care of SPAMMERS and they have been blacklisted - unfortunately this includes *you*.

 

Best thing to do is to find another host :)

 

Matti

Posted
The most likely cause is that your host loves to take care of SPAMMERS and they have been blacklisted - unfortunately this includes *you*.

 

Best thing to do is to find another host :)

 

Matti

 

Thanks for the reply, so it might be a hosting problem. I'll talk to my host. I'll let you know what he says.

Posted

Found a solution!

 

This works for me:

 

look in email.php (there is one in catalog/includes/classes and one in catalog/admin/includes/classes)

 

Find this:

 

	  if (EMAIL_TRANSPORT == 'smtp') {
	return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));
  } else {

 

 

add this line in the white space BEFORE that:

 

ini_set("sendmail_from", "you@your_hosted_domain.com");

 

so that it looks like this:

 

ini_set("sendmail_from", "you@your_hosted_domain.com"); 
  if (EMAIL_TRANSPORT == 'smtp') {
	return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));
  } else {

 

This is why:

On a Windows based server it is necessary to set the "sendmail_from" address explicitly in the PHP.ini file. This will properly set the Return-Path variable in the header and is not necessarily the FROM address displayed on an email address. If the Return-Path is not specified, the email may be considered spam or malformed by most hosts. Especially on common free email servers. Since most hosts, including us, will not provide you with direct access to the PHP.ini file, you will need to set it in your script directly. Additionally, it would be incorrect for the host to specify a generic email address.

 

 

It worked for me!

 

Thanks for the replies, and I hope that this helps!

 

swtummers

  • 2 weeks later...
Posted
This is why:

On a Windows based server it is necessary to set the "sendmail_from" address explicitly in the PHP.ini file. This will properly set the Return-Path variable in the header and is not necessarily the FROM address displayed on an email address. If the Return-Path is not specified, the email may be considered spam or malformed by most hosts. Especially on common free email servers. Since most hosts, including us, will not provide you with direct access to the PHP.ini file, you will need to set it in your script directly. Additionally, it would be incorrect for the host to specify a generic email address.

It worked for me!

 

Thanks for the replies, and I hope that this helps!

 

swtummers

 

 

I have the same problem but my host does not run a Windows server. Any suggestions?

 

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...