• Resolved julien731

    (@julien731)


    Hi,

    I’m using Easy WP SMTP to send out e-mails but I’m having a problem with the e-mail format.

    One of the e-mails that’s sent is in HTML format. However, when it lands in my inbox it just appears as plain text with all the HTML tags showing in the message. Here is the original mail header:

    [header] => Array
    (
    	[0] => MIME-Version: 1.0
    	[1] => Content-type: text/html; charset=utf-8
    	[2] => From: Sender <sender@mail.com>
    	[3] => Reply-To: Sender <reply@mail.com>
    	[4] => Subject: A very cool e-mail
    )

    Can you help me out with this?

    https://wordpress.org/plugins/easy-wp-smtp/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter julien731

    (@julien731)

    You know what, I’ve got my answer. It seems that using the e-mail headers is not reliable when using SMTP plugins. I seem to get reliable results when filtering the content type through wp_mail_content_type instead.

    You are right. The default content type for email sent through the wp_mail function is ‘text/plain’ which does not allow using HTML. However, you can use the wp_mail_content_type filter to change the default content type of the email.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Issue with HTML e-mails’ is closed to new replies.