Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

no emails being sent!!!


chooch

Recommended Posts

Posted

the default email might get overriden with the code above because its just the default argument to the function. You could try the following see if the return path makes a difference:

 

Open includes/classes and admin/includes/classes file email.php

 

Locate this code:

	  if (is_string($headers)) {
	$headers = explode($this->lf, trim($headers));
  }

 

Replace it with this:

	  if (is_string($headers)) {
	if( stristr($headers, 'Return-Path: ') === false ) {
	  $headers = 'Return-Path: ' . STORE_OWNER_EMAIL_ADDRESS;
	}
	$headers = explode($this->lf, trim($headers));
  }

 

then try it.

Posted
the default email might get overriden with the code above because its just the default argument to the function. You could try the following see if the return path makes a difference:

 

Open includes/classes and admin/includes/classes file email.php

 

Locate this code:

	  if (is_string($headers)) {
	$headers = explode($this->lf, trim($headers));
  }

 

Replace it with this:

	  if (is_string($headers)) {
	if( stristr($headers, 'Return-Path: ') === false ) {
	  $headers = 'Return-Path: ' . STORE_OWNER_EMAIL_ADDRESS;
	}
	$headers = explode($this->lf, trim($headers));
  }

 

then try it.

 

dude, it still don't work.

 

am asking my server/host to take a look at why the server is blocking all hotmail.com/yahoo.com and other emails... and allowing [email protected] to get through!

 

i've checked out every thread and contribution.. this is really strange

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted
the default email might get overriden with the code above because its just the default argument to the function. You could try the following see if the return path makes a difference:

 

Open includes/classes and admin/includes/classes file email.php

 

Locate this code:

	  if (is_string($headers)) {
	$headers = explode($this->lf, trim($headers));
  }

 

Replace it with this:

	  if (is_string($headers)) {
	if( stristr($headers, 'Return-Path: ') === false ) {
	  $headers = 'Return-Path: ' . STORE_OWNER_EMAIL_ADDRESS;
	}
	$headers = explode($this->lf, trim($headers));
  }

 

then try it.

 

It works on me.

Can request the password now. Previously did not work.

No more word "root" in the Return-Path header.

 

Chooh,

Have you tried to get the original email.php files and edit them?

Thanks enigma1

Posted
Chooh,

Have you tried to get the original email.php files and edit them?

Thanks enigma1

 

Ok, in the case of Chooh this is what puzzles me. The contact us form works. Now the contact us uses the same email address like the admin side. The only difference is the subject maybe and the target email. The problem however also happens with default installations of osc and I really don't understand how the contact us would work but the other forms won't.

Posted
Ok, in the case of Chooh this is what puzzles me. The contact us form works. Now the contact us uses the same email address like the admin side. The only difference is the subject maybe and the target email. The problem however also happens with default installations of osc and I really don't understand how the contact us would work but the other forms won't.

this is great for jombeli as it works for him... but i can't understand WTF is going on with site...

 

i have been searching for over a week but can't sort it out

 

i have tested it on a fresh install of osC and enigma1 has registered and purchased a test from my unmodified fresh install store - and the emails aren't getting sent out to him

 

no welcome email, order email etc

 

then it is the same for all default sites on 3 different servers...

 

i too am baffled as how the email function works fine except that it seems to send out to [email protected] and in the order copy to: it sends out other names but NOT hotmail, yahoo etc

 

i am going to try to use the code again as enigma1 and jombeli suggested and give it a go

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted
no welcome email, order email etc

 

then it is the same for all default sites on 3 different servers...

 

i too am baffled as how the email function works fine except that it seems to send out to [email protected] and in the order copy to: it sends out other names but NOT hotmail, yahoo etc

 

i am going to try to use the code again as enigma1 and jombeli suggested and give it a go

 

Err what version of PHP running on your hosting? I tried to install osc on php5 on my local pc and ibook; didnt work.

 

Try create a new php file and enter an email test.

<?

mail("[email protected],", "My Subject", "Line 1\nLine 2\nLine 3");

?>

 

If you dont mind, can include me at [email protected]. I can check the email header. U can add a few emails by repeating the line code.

Posted
Err what version of PHP running on your hosting? I tried to install osc on php5 on my local pc and ibook; didnt work.

 

Try create a new php file and enter an email test.

<?

mail("[email protected],", "My Subject", "Line 1\nLine 2\nLine 3");

?>

 

If you dont mind, can include me at [email protected]. I can check the email header. U can add a few emails by repeating the line code.

admin/tools/serverinfo shows this version: PHP Version 4.3.10

 

(without sounding silly) - i dont know how to do the check you are telling me to do

 

i can make a file (emailtester.php)... is there any chance you can please tell me the full code for the whole .php page so i can copy and paste it. also, please tell me what i am supposed to do to test it

 

many thanks

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted

here's another mystery

 

i set up shop email as [email protected] and use the contact form. it does send the mail to me. the [email protected] is diverted to a hotmail.com account

 

i set it up as the [email protected] IT DOES NOT GO THROUGH

 

barring the order copy it seems that only [email protected] goes through (the domain where the catalog/shop is based). anything else is blocked or just not sent out.

 

the same is for the admin/mail too

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted

well I think now I understand. This is probably happens cuz the host has to protect itself. I don't think the host will allow email headers to be generated outside your domain. And that is where the email is originated of course. Now the destination could be any email address.

Posted
well I think now I understand. This is probably happens cuz the host has to protect itself. I don't think the host will allow email headers to be generated outside your domain. And that is where the email is originated of course. Now the destination could be any email address.

thanks for that.. what do i do? ask the host to do something or use the email filter option from cpanel?

 

thanks

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted

you could ask them, but I think they will probably refer to the redirection of the host cpanel.

Posted

Hi guys, I am having the same issues, will try out your solutions as and when I get chance.

 

Can those of you who are having these issues let me know where they host etc. My dedicated server (1and1) has the same problems [actually on two different sites with their own servers] wondering if there is a correlation there...

 

The bit about mail server A records interests me, I'd not even thought about looking there!

Posted
Hi guys, I am having the same issues, will try out your solutions as and when I get chance.

 

Can those of you who are having these issues let me know where they host etc. My dedicated server (1and1) has the same problems [actually on two different sites with their own servers] wondering if there is a correlation there...

 

The bit about mail server A records interests me, I'd not even thought about looking there!

the A server records thing is to do with smtp... but my ISP will automatically block any emails sent out as a batch over 12 (ie newsletters etc will be blocked)

 

i want to use sendmail as it i the best way

 

i have tried it on different servers

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted
admin/tools/serverinfo shows this version: PHP Version 4.3.10

 

(without sounding silly) - i dont know how to do the check you are telling me to do

 

i can make a file (emailtester.php)... is there any chance you can please tell me the full code for the whole .php page so i can copy and paste it. also, please tell me what i am supposed to do to test it

 

many thanks

 

1. Create a file called mailtest.php and enter the script

<?

mail("[email protected],", "My Subject", "Line 1\nLine 2\nLine 3");

mail("[email protected]," "My Subject", "Line 1\nLine 2\nLine 3");

?>

2. Replace [email protected] with your email. After u uploaded to the server, browse to that file http://yourdomain/mailtest.php. You will see an white page. The page will auto send the email to you and me.

3. When I receive the mail, I will check your email header.

 

Most probably email sent to customer will be blocked by customer's ISP/hosting because of its spam rule.

I will let u know once I received the email.

Posted
1. Create a file called mailtest.php and enter the script

<?

mail("[email protected],", "My Subject", "Line 1\nLine 2\nLine 3");

mail("[email protected]," "My Subject", "Line 1\nLine 2\nLine 3");

?>

2. Replace [email protected] with your email. After u uploaded to the server, browse to that file http://yourdomain/mailtest.php. You will see an white page. The page will auto send the email to you and me.

3. When I receive the mail, I will check your email header.

 

Most probably email sent to customer will be blocked by customer's ISP/hosting because of its spam rule.

I will let u know once I received the email.

i did it but all i got was:

 

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

 

--------------------------------------------------------------------------------

 

Please try the following:

 

If you typed the page address in the Address bar, make sure that it is spelled correctly.

 

Open the www.domain.com home page, and then look for links to the information you want.

Click the Back button to try another link.

Click Search to look for information on the Internet.

 

 

 

HTTP 404 - File not found

Internet Explorer

 

dont know what is going on

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted
1. Create a file called mailtest.php and enter the script

<?

mail("[email protected],", "My Subject", "Line 1\nLine 2\nLine 3");

mail("[email protected]," "My Subject", "Line 1\nLine 2\nLine 3");

?>

2. Replace [email protected] with your email. After u uploaded to the server, browse to that file http://yourdomain/mailtest.php. You will see an white page. The page will auto send the email to you and me.

3. When I receive the mail, I will check your email header.

 

Most probably email sent to customer will be blocked by customer's ISP/hosting because of its spam rule.

I will let u know once I received the email.

i did it dude....

 

did you get the email, i got it!!

 

thanks man... where do i go from here now that i know what the header info is

 

thanks

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted
Is that your sender info using that script?

Could you please PM me your email header that you received (copy and paste).

Actually, my email is typo. It should be [email protected]. :blush:

ok, my hosting company has fixed it... all emails are sent correctly now

 

i have no idea what they did... i am trying find out and hopefully they will tell me so i can put the answer here!

 

thanks to all for your support

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Posted

Good to hear it's working!

 

For the others still having problems, before hacking the mail functions of osCommerce to see if updates work, it is best to get to the roots of the problem and see if the PHP mail() function actually works on the server or not.

 

Here is a contribution that can help out in testing:

 

http://www.oscommerce.com/community/contributions,1595

 

It sends two emails, one using the email functions from osCommerce, and another email using only the PHP mail() function.

 

If the PHP mail() function does not send out an email, you then know there is a PHP configuration problem on your server and leaves osCommerce innocent of problems :D

 

Seriously, having this information at hand will help your server administrator out.

 

Hope that helps!

:heart:, osCommerce

Posted

Aleen,

 

did your host company tell you how they fixed the problem, I'm having the same problem, I'm able to recive email from the Contact us only

I tried the test email contribution but non of the two email was received

 

Please help

 

 

Thanks

Posted
Never Mind,

 

I solve my problem, just need to Allow relay for privileged IP ranges

Thanks

dont know if thats what they did... they said something to do with file permissions

 

i notice that the admin DOES NOT send out an email when customer details are changed - it used to do that. Also, when product details are changed, anyone on the product notification list DOES NOT get an email update... strange

 

it's all way over my head!

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

  • 2 weeks later...
Posted

Same thing happened to us. 2 years without problems. Then mid September on 2 oscommerce sites emails stopped working, both in admin>tools and contact_us. No errors; the message always said the emails were sent. But they weren't received by either our forwarded address or in the spam-filter folder.

 

I used the email test contribution which showed that the sendmail worked. Still no emails received by our primary address. Then I tried a gmail account and the emails were received. Contacted our ISP to try to find out why they weren't at least bounced into the spam folder. Long song-and-dance about spam filtering algorithims...email headers...etc.

 

The quick temparary solution was that we had to change our oscommerce email address so that customer enquiries and order notifications bypassed the ISP's filtering software:

 

[email protected] to [email protected]

  • 4 weeks later...
Posted

Hi I'm new to e-commerce, having recently set up my first shop.

 

Everything was fine e-mails working etc. then they stopped sudddenly and I couldn't find the reason, I searced on the forum and it seemed to point to the ISP which seemed logical as the server settings for e-mail had been changed 2 days before.

 

So I rested happily in the knowledge that when I changed from the test server everything would be fine.

 

Then I started thinking of what else could have caused the problem and I looked at things from a different perspective as the problem seemed to revolve around my POP3 account.

 

My first port of call was McAfee internet security as I had recently made a change there by switching off the spam filter, so I switched it back on again. And to my absolute delight test transactions were once again sending e-mails to the correct accounts and keeping customers informed.

 

As this approach hasn't been mentioned before I thought I would throw it into the mixing pot as it may help someone else.

 

Colin Needham

Archived

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

×
×
  • Create New...