Best way to do html e-mail, sending via php?

I've never done html e-mail before, I've just set up php mail using

I was wondering how I would go about sending php mail as html?

Does anybody have any previews of a php page sending html e-mail I can look at to get the jist of how it works?

Currently I'm just putting text into a variable and sending it as a message, how is it done for html?



Do you still want to use Postmark to send emails?

In Postmark, you set the TextBody property to the text version of your message, and the HtmlBody property to the html version of it. It is good practice to always include both. Depending on whether your user's email client supports HTML or not, the appropriate message form is rendered. Read more on this here.

Edit: Added an example. I generally like splitting my string into separate lines so that I can indent it nicely like a real HTML file. Of course, if you used templates, that would make it so much better.

$htmlBody = "
        Thank you for using our app!<br />
        - Super Awesome App Team

Need Your Help

Require https with Spring Security behind a reverse proxy

java https spring-security reverse-proxy

I have a Spring MVC application secured with Spring Security. The majority of the application uses simple http to save resources, but a small part processes more confidential information and requir...

How to make a button that is directing you to another page, in php/Jquery(javascript)?

php jquery

Hello I'm making a very basic "Login system" without sql database yet.