Jump to content

IP address of submitted Contact Forms


bondimedical

Recommended Posts

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...