04/04/2018 at 10:37 am
#457762
Keymaster
@ Stephen
You would have to alter this line in Contact to include the additional info in the message body:
// Set the message.
$email->message( sanitize_text_field( $_POST['message'] ) );
So something like this should work:
// Set the message.
$email->message( $entry->getName() . '<br>' . $sendTo . '<br>' . sanitize_text_field( $_POST['message'] ) );
OR:
// Set the message.
$email->message( sanitize_email( $_POST['email'] ) . '<br>' . sanitize_text_field( $_POST['name'] ) . '<br>' . sanitize_text_field( $_POST['message'] ) );
Depends on which name and email you wish to include in the message body.
