Quantcast
Channel: WordPress.org Forums » [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin] Support
Viewing all articles
Browse latest Browse all 4996

Sending E-Mails from Pages/Blogs

$
0
0

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

  • This topic was modified 3 hours, 38 minutes ago by jury2001.
  • This topic was modified 3 hours, 36 minutes ago by jury2001.

Viewing all articles
Browse latest Browse all 4996

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>