noncents Posted June 1, 2008 Share Posted June 1, 2008 Firstly I wanted to give sincere thanks to everyone on these forums. Up until now i've found an answer to everything just by searching. My problem is with the 'tell a friend' feature. Fashosts will only allow emails to pass through their systems that are on the domain they are sent from. In this instance [email protected] . However the tell a friend script directs the email from the users email address. The solution I had in mind was to fix the sender email address to one on the domain and take away the users ability to change this. But i'm not to clued up with PHP so I can't seem to get it to work. I'm looking at the file: catalog/tell_a_friend.php at line 36ish: if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) { $error = false; $to_email_address = tep_db_prepare_input($HTTP_POST_VARS['to_email_address']); $to_name = tep_db_prepare_input($HTTP_POST_VARS['to_name']); $from_email_address = tep_db_prepare_input($HTTP_POST_VARS['from_email_address']); $from_name = tep_db_prepare_input($HTTP_POST_VARS['from_name']); $message = tep_db_prepare_input($HTTP_POST_VARS['message']); if (empty($from_name)) { $error = true; Is this where I can do that? Any ideas?!?!?! "If I have seen further it is by standing on the shoulders of giants" Link to comment Share on other sites More sharing options...
germ Posted June 1, 2008 Share Posted June 1, 2008 Do it later in the code: tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address); Alter that line to something like: tep_mail($to_name, $to_email_address, $email_subject, $email_body, 'me', '[email protected]'); You don't "take anything away" doing it like this. The email will still say "Your friend blah blah....", but the "from" email address is what you put in the code. Good enough? :unsure: 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...
noncents Posted June 1, 2008 Author Share Posted June 1, 2008 Do it later in the code: tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address); Alter that line to something like: tep_mail($to_name, $to_email_address, $email_subject, $email_body, 'me', '[email protected]'); You don't "take anything away" doing it like this. The email will still say "Your friend blah blah....", but the "from" email address is what you put in the code. Good enough? :unsure: Much better than my idea! Absolute legend! Thanks Jim "If I have seen further it is by standing on the shoulders of giants" Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.