WordPress get_the_content losing formatting when emailed

The default email content type is text/plain which does not allow using HTML.

Add this to your functions.php file:

// use HTML instead of plain text
add_filter( 'wp_mail_content_type', 'my_awesome_mail_content_type' );

function my_awesome_mail_content_type() {

    return 'text/html';
}

But be warned, different email clients has very different support for CSS rules.. Read more from here.


Alternative: If you want to keep using text/plain, you will need to avoid any HTML (it might break something) and use \n instead of <br/> – it’s basically the same thing, just a text/plain version.