Send email with Content-Type text/plain

You didn’t say how you’re sending emails, but if you’re using wp_mail, this is how you change the type to text/plain:

function wp_set_mail_plaintext() {
    return 'text/plain';
}
add_filter( 'wp_mail_content_type', 'wp_set_mail_plaintext' );

error code: 523