• Resolved agm285

    (@agm285)


    I’m sorry if this isn’t the right place for this question, but I’m using Postman SMTP and thought you might know about sending as html. When I send as html:

    $to = '[email protected]';
    	$subject = 'The subject';
    	$body = 'The email body content';
    	$headers = array('Content-Type: text/html; charset=UTF-8');
    	wp_mail( $to, $subject, $body, $headers );

    I don’t see a way to provide a text version of the same body for readers that don’t support html. Is that allowed?

    https://www.ads-software.com/plugins/postman-smtp/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jason Hendriks

    (@jasonhendriks)

    Postman’s test email is an example of a message that has both text and html parts. It’s content type is “multipart/alternative” which is a MIME extension.

    You need to research multipart.

    This example seems pretty good (except that there is no html in the html part) – of course you’ll want to substitute wp_mail for mail.

    Thread Starter agm285

    (@agm285)

    Many thanks, that’s exactly what I needed!

    Thanks for a great plugin. It sounds like you learned php specifically to make these WP plugins. Nice work. I’ll post a review.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Send as HTML, is there text version also sent?’ is closed to new replies.