• 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.' <[email protected]>','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 7 years, 8 months ago by jury2001.
    • This topic was modified 7 years, 8 months ago by jury2001.
Viewing 1 replies (of 1 total)
  • Thread Starter jury2001

    (@jury2001)

    My Mailer is “Other SMTP”
    e-mail-account,
    with SMTP-Host,
    SMTP Port (25),
    SMTP-User
    Password,
    No TLS

    Test-mail works fine and Forms (WP Forms) were delivered as well.
    My own Form don’t send any mail but without any error-message
    wp_mail() doesn’t returns true or false.

    • This reply was modified 7 years, 8 months ago by jury2001.
Viewing 1 replies (of 1 total)

The topic ‘Sending E-Mails from Pages/Blogs’ is closed to new replies.