blair Posted February 2, 2004 Share Posted February 2, 2004 Hi, Wondering if anyone has experienced something like this?.. A number of customers have complained about not receiving emails for order confirmations and updates. I know for a fact that some customers get them fine. I did some tests and found one of my own email addresses doesn't work while another one does. I took forgotton password to test with and added another request to send the email - this time, hardcoding my working email address in. tep_mail($check_customer['customers_firstname'] . " " . $check_customer['customers_lastname'], $HTTP_POST_VARS['email_address'], EMAIL_PASSWORD_REMINDER_SUBJECT, nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY, $newpass)), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); tep_mail($check_customer['customers_firstname'] . " " . $check_customer['customers_lastname'], '[email protected]', EMAIL_PASSWORD_REMINDER_SUBJECT, nl2br(sprintf(EMAIL_PASSWORD_REMINDER_BODY . ' ' . $HTTP_POST_VARS['email_address'], $newpass)), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); You'll notice I have added a second call to tep_mail with the hardcode email address (that I know works) and I also put the email address of the customer requesting the forgotten password into the new call. I requested a new password for the address I know doesn't work. Sure enough, I only received one email - from the hardcoded tep_mail call. No email was received for the address used to request the forgotten password. I did all this to discount the forgotten_password.php and the store configuration as the problem as I know its running these calls fine now, and does send emails to some people. I'd appeciate anyones thoughts on why some email addresses just don't receive the emails through oscommerce?... Thanks alot.. Blair. Link to comment Share on other sites More sharing options...
blair Posted February 2, 2004 Author Share Posted February 2, 2004 If it helps at all, I ran the email test script http://www.oscommerce.com/community/contributions,1595 and received both emails to the address that worked with my previous (lost password) test and didn't receive any to the address that didn't work before. Blair. Link to comment Share on other sites More sharing options...
Guest Posted March 15, 2005 Share Posted March 15, 2005 blair, ive been having a similar problem. only some addresses receive the email.. I cant figure it out. I've even sent the email to different domains on the SAME server and it works on one and not the other. Link to comment Share on other sites More sharing options...
go2pub Posted July 21, 2005 Share Posted July 21, 2005 I'm faced with the very same problem. A couple of days ago I sent a test email to my self and it didn't arrive. I then entered a couple of dummy customers using different email addresses and tried sending an email to each. The address ******@btinternet.com and *****@ntl.com didn't get through but others did. Any help would be greatly appreciated. Nigel Link to comment Share on other sites More sharing options...
go2pub Posted July 22, 2005 Share Posted July 22, 2005 I appreciate no one may know how to fix this problem, but I'm wondering if it's happened to anyone else? Link to comment Share on other sites More sharing options...
redrum Posted July 23, 2005 Share Posted July 23, 2005 I'm also facing this problem. I have installed OSC several times on different servers, and this have never occur for me. Could it depends on the version of PHP? on this machine I have 4.3.10 // Fredrik Link to comment Share on other sites More sharing options...
go2pub Posted July 24, 2005 Share Posted July 24, 2005 I'm also facing this problem. I have installed OSC several times on different servers, and this have never occur for me.Could it depends on the version of PHP? on this machine I have 4.3.10 // Fredrik <{POST_SNAPBACK}> Don't think the php version should have anything to do with it, BUT having checked, my server is set up with the same version 4.3.10 I'd really really love someone to come up with an answer.... :( Link to comment Share on other sites More sharing options...
rose3694 Posted July 24, 2005 Share Posted July 24, 2005 You know what I am having that same problem but I'm not sure if maybe something got messed up when adding some contributions or something but I have had the problem in the past it either taking forever to get a test email or never getting but yet others get the emails just fine. I really would like to find a way to fix this because I as sending emails out to affiliates tonight and realized no boy was getting the emails I was sending and ended up resending them using Outlook. And suggestions as to where to start looking. Also when cusotmers use the contact me form it doesn't go through, TIA, Carol Link to comment Share on other sites More sharing options...
bsnmcahi Posted July 24, 2005 Share Posted July 24, 2005 Im having the same problem now too! same thing as above, I know that some customers are receiving emails but not sure how many? I have tried the email_test.php to a gmail and hotmail account both DONT work. Then tried it to my .co.uk email addresses and it worked fine? Anybody know why this is? Link to comment Share on other sites More sharing options...
6thirty Posted July 24, 2005 Share Posted July 24, 2005 Yep, I've got this happening too. I can send fine from Outlook to everyone, and it sends from the site to most domains, ones that I know aren't working are AOL, Lycos and Pipex, but there are probably more. Surely someone has found a fix for this - or at least what the problem is :-" Link to comment Share on other sites More sharing options...
go2pub Posted July 27, 2005 Share Posted July 27, 2005 This problem could be effecting many more people, who simply don't know it exists. I only really found out by accident. I've now had a customer phone me complaining that I didn't contact her about her order, I had emailed her through the order update system, but she obviously didn't get it. :( :( :( Link to comment Share on other sites More sharing options...
6thirty Posted July 27, 2005 Share Posted July 27, 2005 I think we should keep asking questions until some sendmail guru notices this thread. For the purposes of comparison, it may help if we all posted the domains we have problems sending to. I know that we cant send to Lycos.co.uk, AOL.com and Dial.Pipex.com. I did some experimenting and have noticed that if I send mail from an account on our server, but via outlook (ie bypassing sendmail) then the mail gets through fine. If I telnet to the mail server and send mail that way, it works fine. If I try to send from the site (ie using sendmail) it doesn't work. After examining the message headers, the only real differences are that the Return-path from outlook is the same as the email address ([email protected]), but when it goes through the site the Return-path is [email protected]. I read that some mail servers will reject a message when the return-path is not a valid email address (as is the case here) so I tried a few ways of forcing the return-path to be the same as the "From" email address, but none of them worked. Sendmail kept setting the return-path as [email protected] I totally agree that many stores may have this problem and just not realise. Oh well, just gotta keep trying. :blush: Link to comment Share on other sites More sharing options...
go2pub Posted July 27, 2005 Share Posted July 27, 2005 I read that some mail servers will reject a message when the return-path is not a valid email address (as is the case here) so I tried a few ways of forcing the return-path to be the same as the "From" email address, but none of them worked. Sendmail kept setting the return-path as [email protected] I've just tried changing my address in osc admin to the dummy return address sendmail enters in the header and guess what...it works, emails were sent fine. So that's the problem now for the solution, as obviously we can't have a dummy address as our main website address. At least we're moving forward ;) Nigel Link to comment Share on other sites More sharing options...
redrum Posted July 28, 2005 Share Posted July 28, 2005 Could it have something to do that the server use qmail instead of sendmail? // Fredrik Link to comment Share on other sites More sharing options...
go2pub Posted July 28, 2005 Share Posted July 28, 2005 Could it have something to do that the server use qmail instead of sendmail? We're using sendmail so I don't think that's the problem. I did a few more tests today and I'm pretty certain the problem is the Return-Path: in the header of the email being different to the from: address, but I just don't have a clue what to do about it. :'( Nigel Link to comment Share on other sites More sharing options...
Guest Posted July 28, 2005 Share Posted July 28, 2005 Found this on the PHP site on the page for mail function You want to setup the Return-Path on a email sent, without modifing the php.ini or httpd.conf file. You can do it in your php code. EXAMPLE: mail("$to", "$subject", "$message", "From: $from\nX-Mailer: PHP/ . $phpversion()", "-f $from"); END EXAMPLE: Notice the "-f" at the end of the function. This will set the return-path. Use that to change the return-path and see what happens. Link to comment Share on other sites More sharing options...
6thirty Posted July 29, 2005 Share Posted July 29, 2005 Nice one mikeq, I've managed to edit some code and seem to have solved the problem. The only minor issue is that you get an x-authentication warning in the email header, but it seems to work ok regardless. Make sure you back up before trying this, and don't blame me if it doesn't work for you :-" Basically, in functions/general.php and admin/functions/general.php you need to change the line (mine is around 1109): function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) to: to function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address, $returnpath) and then (around line 1125): $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject); to: $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject, $returnpath); That's the easy part. You now need to set up a returnpath variable. If you are sloppy then you can add it to each page that makes a call to tep_mail, or for a more elegant solution, add it to includes/application_top.php and admin/includes/application_top.php. Something like this should do it: $returnpath = ('-f' . STORE_OWNER_EMAIL_ADDRESS); You then need to go through all the files that make a call to tep_mail and add a returnpath to the end of the call. They usually look like this: tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email_received, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); and need to look like this: tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email_received, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $returnpath); I had about 40 of them, but it will obviously depend on what contris you have installed etc. Good luck, and thanks to everyone for trying to get this sorted :thumbsup: Link to comment Share on other sites More sharing options...
redrum Posted July 30, 2005 Share Posted July 30, 2005 I read that some mail servers will reject a message when the return-path is not a valid email address (as is the case here) so I tried a few ways of forcing the return-path to be the same as the "From" email address, but none of them worked. Sendmail kept setting the return-path as [email protected] One server I have the return-path is set to [email protected], and that shops sends all the emails as it should. On the other server where I have this problem, the return-path is [email protected] // Fredrik Link to comment Share on other sites More sharing options...
Guest Posted July 30, 2005 Share Posted July 30, 2005 One server I have the return-path is set to [email protected], and that shops sends all the emails as it should. On the other server where I have this problem, the return-path is [email protected] // Fredrik <{POST_SNAPBACK}> Have a bash at the solution 6thirty has provided Link to comment Share on other sites More sharing options...
redrum Posted July 30, 2005 Share Posted July 30, 2005 Have a bash at the solution 6thirty has provided <{POST_SNAPBACK}> I had no luck with this. I did get the messege -fSTORE_OWNER_EMAIL_ADDRESS at the top of the email to those addresses where the email was received. But there is still an email addres that dont receive any email. The return-path is stil the same as well. I also tried to edit my php.ini-file. In sendmail_from changed from [email protected] to info@[my domain].net. But the Return-path stills stays the same in the email. Does anyone know if it is possible to change anything in php.ini to resolve this problem? // Fredrik Link to comment Share on other sites More sharing options...
redrum Posted July 30, 2005 Share Posted July 30, 2005 I had no luck with this. I did get the messege -fSTORE_OWNER_EMAIL_ADDRESSat the top of the email to those addresses where the email was received. But there is still an email addres that dont receive any email. The return-path is stil the same as well. I also tried to edit my php.ini-file. In sendmail_from changed from [email protected] to info@[my domain].net. But the Return-path stills stays the same in the email. Does anyone know if it is possible to change anything in php.ini to resolve this problem? // Fredrik <{POST_SNAPBACK}> Forget about this message, I just noticed one thing and I was to slow to edit the post. I'll send a new one later with updated info of how everyting going // Fredrik Link to comment Share on other sites More sharing options...
redrum Posted July 30, 2005 Share Posted July 30, 2005 I played around abit, and now I have the same Return-Path from the both servers. But still the promblem resist on the new server. So I'm not sure it is an Return-Path issue. Could the problem be resolved by change something in php.ini? // Fredrik Link to comment Share on other sites More sharing options...
Guest Posted July 30, 2005 Share Posted July 30, 2005 I played around abit, and now I have the same Return-Path from the both servers. But still the promblem resist on the new server.So I'm not sure it is an Return-Path issue. Could the problem be resolved by change something in php.ini? // Fredrik <{POST_SNAPBACK}> Are you getting any errors? or is just not sending the mail out? Link to comment Share on other sites More sharing options...
redrum Posted July 31, 2005 Share Posted July 31, 2005 Are you getting any errors? or is just not sending the mail out? <{POST_SNAPBACK}> No errors, its just not sending the mail to certain email addresses. Link to comment Share on other sites More sharing options...
go2pub Posted July 31, 2005 Share Posted July 31, 2005 Nice one mikeq, I've managed to edit some code and seem to have solved the problem. The only minor issue is that you get an x-authentication warning in the email header, but it seems to work ok regardless. Make sure you back up before trying this, and don't blame me if it doesn't work for you :-" Basically, in functions/general.php and admin/functions/general.php you need to change the line (mine is around 1109): function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) to: to function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address, $returnpath) and then (around line 1125): $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject); to: $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject, $returnpath); That's the easy part. You now need to set up a returnpath variable. If you are sloppy then you can add it to each page that makes a call to tep_mail, or for a more elegant solution, add it to includes/application_top.php and admin/includes/application_top.php. Something like this should do it: $returnpath = ('-f' . STORE_OWNER_EMAIL_ADDRESS); You then need to go through all the files that make a call to tep_mail and add a returnpath to the end of the call. They usually look like this: tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email_received, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); and need to look like this: tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email_received, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $returnpath); I had about 40 of them, but it will obviously depend on what contris you have installed etc. Good luck, and thanks to everyone for trying to get this sorted :thumbsup: <{POST_SNAPBACK}> Tried this but it doesn't seem to have worked for me, I now just get the return email in the body of the message in the format below -f[email protected] The return path in the header is still [email protected] any ideas appreciated. I've followed the instructions above to the letter and double checked it but nothing, I've only added the $returnpath to one tep_mail command in contact_us.php to test it. Thanks Nigel Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.