bondimedical Posted September 19, 2015 Share Posted September 19, 2015 I have noticed that reviews have the IP address of the person who submitted it in the Admin. How can I do the same for people who submit questions through the Contact Us Form, perhaps including the IP address in the message sent to the designated email? Quote Link to comment Share on other sites More sharing options...
bsmither Posted September 19, 2015 Share Posted September 19, 2015 We could edit the email's content template* but in this case, it would be easier to make a hard-edit to the code.In the file /classes/cubecart.class.php, in the _contact() function, near line 1379:Find: $mailer->Body = sprintf($GLOBALS['language']->contact['email_content'], $_POST['contact']['name'], $_POST['contact']['email'], $department, strip_tags($_POST['contact']['enquiry'])); On a new line after that, add: $mailer->Body .= "\n\nSent from IP Address: ".get_ip_address();*Note: the template for the Contact Us email is part of the main language pack, not from a separate email language file that got databased during install and is 100% editable in the Email Templates pages in admin.This language "phrase" is editable in the admin Language Phrase Editor, but will be come corrupted after attempting to do so. Quote Link to comment Share on other sites More sharing options...
bondimedical Posted September 19, 2015 Author Share Posted September 19, 2015 Thanks for your help. I will play around with this and see how it works. The main reason I want this is because I have switched off my recaptcha but now my Contact form is being bombed by spam bots. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.