Millie Posted March 29, 2010 Share Posted March 29, 2010 Hello, My oscommerce emails have been working for a couple years but my host changed email security and now all the submissions on the contactus page are bouncing. My host says, "The server cannot send mail from domain names that it does not host. This is done to prevent SPAM from leaving the network." To fix they suggest' "Instead of using the From: header to store the email address of the person attempting to contact you, use the Reply-To: header, and set the From: address to a domain that is hosted on the server." I have been unable to figure out how to change the email headers as suggested and would appreciate suggestions for resolving this problem. I'm using sendmail. Thank you, Millie Link to comment Share on other sites More sharing options...
germ Posted March 29, 2010 Share Posted March 29, 2010 Hello, My oscommerce emails have been working for a couple years but my host changed email security and now all the submissions on the contactus page are bouncing. My host says, "The server cannot send mail from domain names that it does not host. This is done to prevent SPAM from leaving the network." To fix they suggest' "Instead of using the From: header to store the email address of the person attempting to contact you, use the Reply-To: header, and set the From: address to a domain that is hosted on the server." I have been unable to figure out how to change the email headers as suggested and would appreciate suggestions for resolving this problem. I'm using sendmail. Thank you, Millie At the top of /catalog/contact_us.php change this code: tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); to // tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); $headers = 'From: ' . STORE_OWNER_EMAIL_ADDRESS . "\r\n" . 'Reply-To: ' . $email_address . "\r\n"; mail(STORE_OWNER_EMAIL_ADDRESS , EMAIL_SUBJECT , $enquiry , $headers, ''); BACKUP THE FILE BEFORE MAKING ANY EDITS. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Millie Posted March 30, 2010 Author Share Posted March 30, 2010 Thank you germ! I need to test it some more but it seems to do just what I need. I sure appreciate the help. Millie Link to comment Share on other sites More sharing options...
multimixer Posted March 30, 2010 Share Posted March 30, 2010 I had the idea to use the osC tep_mail function to do this, instead of replacing it with the "standard" php mail function. I posted this here -->email issues The point is that you need to include $headers to the tep_mail function in includes/functions/general.php like this function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address, $headers) { and $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject, $headers); Then you can use what Jim said, replacing the mail(STORE_OWNER_EMAIL_ADDRESS , EMAIL_SUBJECT , $enquiry , $headers, ''); with tep_mail(STORE_OWNER_EMAIL_ADDRESS , EMAIL_SUBJECT , $enquiry , $headers, ''); My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.