Skip to:
Content
Pages
Categories
Search
Top
Bottom

Impossible to send email in HTML format using wp_mail


  • nicolan
    Participant

    @nicolan

    Hi,

    Do you know why BP send email in Plain text format when we use a third party SMTP plugin? Do you know if there is a way to force BP to use HTML emails with wp_mail?

    Thanks in advance fpr your support.

    Nicolas

Viewing 2 replies - 1 through 2 (of 2 total)

  • Renato Alves
    Moderator

    @espellcaste

    I don’t think we force the emails to be sent as Plain Text. Can you confirm what’s the value for wp_mail_content_type? Is it possible a plugin is hooking into this filter?


    ashtonagar
    Participant

    @ashtonagar

    Here’s a code snippet demonstrating how to send an HTML email using wp_mail():

    PHP
    function send_html_email() {
    $to = ‘recipient@example.com’;
    $subject = ‘Test HTML Email’;
    $message = ‘<html>
    <body>
    <h1>This is an HTML email</h1>
    <p>You can use HTML tags here.</p>
    </body>
    </html>’;
    $headers = array(‘Content-Type: text/html; charset=UTF-8’);

    wp_mail($to, $subject, $message, $headers);
    } For More CLICK HERE

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar