Replies: 0
Hi all,
I want to send an E-Mail from a Form (not created with WP Forms) to different e-mail-addresses. I use
$userName = $_POST['userName'];
$headers = array('Content-Type: text/html; charset=UTF-8','From: '.$userName.' <serviceportal@vrnetworld.de>','Replay-To: '.$userName.' <'.$userMail.'>' );
$targetMail = $_POST['targetMail'];
$subject = $userName." Some text";
$html = '<div>Some html with body of mail</div>';
wp_mail($targetMail, $subject, $html, $headers);
It dosn’t work. What’s wrong?
I use WP Mail SMTP version: 1.2.5
My WP Version: 4.9.6