Aceicol Posted December 1, 2005 Share Posted December 1, 2005 Hi I used a bug fix to stop the email spamming caused by a fault in contact_us.php however it is now cutting my subject line whenever a N or an R appear in the subject line. Hence our subject line should say Welcome to the Italian Lighting Centre But it just comes up Welcome to Italia And Order Process Comes up as O The code I installed is below any advice is grateful. *********************************************** if(eregi('Content-Type:',$to_name)) return false; if(eregi('Content-Type:',$email_subject)) return false; if(eregi('Content-Type:',$from_email_name)) return false; if(eregi('Content-Type:',$email_text)) return false; $to_name = preg_replace('/[n|r].*/','',$to_name); $email_subject = preg_replace('/[n|r].*/','',$email_subject); $from_email_name = preg_replace('/[n|r].*/','',$from_email_name); ****************************************************** Thank you Alex Link to comment Share on other sites More sharing options...
bob61 Posted January 30, 2006 Share Posted January 30, 2006 Hi I used a bug fix to stop the email spamming caused by a fault in contact_us.php however it is now cutting my subject line whenever a N or an R appear in the subject line. Hence our subject line should say Welcome to the Italian Lighting Centre But it just comes up Welcome to Italia And Order Process Comes up as O The code I installed is below any advice is grateful. *********************************************** if(eregi('Content-Type:',$to_name)) return false; if(eregi('Content-Type:',$email_subject)) return false; if(eregi('Content-Type:',$from_email_name)) return false; if(eregi('Content-Type:',$email_text)) return false; $to_name = preg_replace('/[n|r].*/','',$to_name); $email_subject = preg_replace('/[n|r].*/','',$email_subject); $from_email_name = preg_replace('/[n|r].*/','',$from_email_name); ****************************************************** Thank you Alex I am just getting set-up but have experienced same problem. Did you find a solution? Noticed you got no responses from others so maybe the fix is known. Link to comment Share on other sites More sharing options...
bob61 Posted January 30, 2006 Share Posted January 30, 2006 Found fix - the "fix" that you (and I) had installed is incorrect. Found this mentioned, replaced the code above and emails going through now fine. in the catalog/includes/functions/general.php replace your code with this: function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) { if (SEND_EMAILS != 'true') return false; //--begin-toevoeging-anti-spam if (preg_match("[\n]", $to_name)) return false; if (preg_match("[\n]", $to_email_address)) return false; if (preg_match("[\n]", $email_subject)) return false; if (preg_match("[\n]", $from_email_name)) return false; if (preg_match("[\n]", $from_email_address)) return false; //--einde-toevoeging-anti-spam Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.