04/03/2018 at 7:09 am
#457631
Participant
Hi Steve,
I would like to do the following:
- Change the ‘from’ parameter to the static ‘webmaster@ludgatehillpsychotherapy.co.uk’
and
- Have a reply-to field which is populated by the email address of the person filling out the form.
I tried to do it like this, but I am a novice…
// Set email to be sent as HTML.
$email->HTML();
// Set from whom.
$email->from(
sanitize_email('stephen@ludgatehillpsychotherapy.co.uk'),
sanitize_text_field( 'Ludgate Hill Psychotherapy' )
);
//Set reply to.
$email->reply(
sanitize_email( $_POST['email'] ),
sanitize_text_field( $_POST['name'] )
);
// Set to whom.
$email->to(
$sendTo,
$entry->getName()
);
