Replies: 0
I wasn’t able to get the default notification emailer to work on localhost, so installed WP mail SMTP. It works, but at the top of the body of every email sent, is an extra few lines of white area, and on the top line, some spurious characters “jdkldjld”.
I found the following code in functions.php:
add_filter( ‘wp_mail’, function( $args ) {
$args[‘message’] = apply_filters(‘the_content’, $args[‘message’]);
return $args;
});
add_action( ‘phpmailer_init’, function( $phpmailer ) {
//if( ‘text/plain’ === $phpmailer->ContentType ) {
$phpmailer->Body = ‘jdkldjld’ . apply_filters(‘the_content’, $phpmailer->Body);
//}
});
So that’s obviously where the spurious characters are coming from. I’m not a coder and I’d like to get rid of the spurious characters and the empty white area. I can delete the extra characters from the code but how do I get rid of the empty white area?