• Resolved wildlifeweb

    (@wildlifeweb)


    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?

Viewing 1 replies (of 1 total)
  • Plugin Support Darshana

    (@darshanaw)

    Hi @wildlifeweb,

    Thanks for reaching out! Are you referring to the functions.php file under your theme?

    Basically, that code is not added by the WP Mail SMTP plugin. It could probably be a custom code added by your theme developers or some other 3rd party plugin.

    If you’re on localhost, try creating another WordPress installation, install the WP Mail SMTP plugin, and test.

    I hope this helps. Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Extra space above email, and characters’ is closed to new replies.