camerriman Posted August 27, 2004 Posted August 27, 2004 Installed osCommerce on a RAQ4 - PHP 4.1.2 - Does anyone have the solution on how to change both the Return-Path: and Received: (from httpd@localhost) to the store administrator email address? Without a proper return path etc. emails don't seem to make it through spam filters. I can send/receive emails in and out of osCommerce to local accounts that do not have spam filters -
camerriman Posted August 27, 2004 Author Posted August 27, 2004 Return-Path: Solved. After looking through all the posts here - I was able to find a solution. The solution is setting the $xtra_headers option to '-f' in both /includes/classes/email.php and admin/includes/classes/email.php Look at or around line 500 for "if (EMAIL_TRANSPORT == ... " You can cut and paste this into both email.php files 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),'-f' . $from_addr); } else { return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers),'-f' . $from_addr); }
John-Doe Posted September 4, 2004 Posted September 4, 2004 Hi Craig, would you know if this also results in getting return mails if the customer mail address does not exist? If so that would be exactly what I'm looking for :) (going to try it anyway, I"ll post back if it works)
John-Doe Posted September 5, 2004 Posted September 5, 2004 The Return-Path works fine now, thanks for that Craig :) I"ll post back if it worksI promised, so here it is: It does not help to get the "failure notice" mails if the customers email address does not exists though :( But I did find another interesting thread about that subject here: http://www.oscommerce.com/forums/index.php?showtopic=23392
John-Doe Posted September 8, 2004 Posted September 8, 2004 It does not help to get the "failure notice" mails if the customers email address does not exists though Correction, it does help! Or at least it helps in my case. I only had to fill in the real mail address in stead of $from_addr ($from_addr contains "Name <[email protected]>" i.s.o. "[email protected]"). So now mails sent from my shop to non existing mail addresses are returned with a "failure notice". That makes it much easyer to find out if the customer didn't make a typo when filling in his/her mail address.
Guest Posted February 5, 2006 Posted February 5, 2006 Correction, it does help! Or at least it helps in my case. I only had to fill in the real mail address in stead of $from_addr ($from_addr contains "Name <[email protected]>" i.s.o. "[email protected]"). How did you replace this? It gave me an error when I changed it. (unexpected @)
kahraman Posted October 4, 2008 Posted October 4, 2008 In my osommerce store the changes above for both email.php files does not have any effect, the return path remains the same, i use PHP-5 does someone nows the answer to this problem when this solution above does nog help ? :blink: Thanks in forward
Recommended Posts
Archived
This topic is now archived and is closed to further replies.