Skip to:
Content
Pages
Categories
Search
Top
Bottom

After Update buddypress 2.5, Mail not send html fromat


  • nilay89
    Participant

    @nilay89

    Hello,

    Wordpress: 4.4.2
    Buddypress: 2.5.0

    After Buddypress 2.5 Update, All Buddypress mail not send in html format. I have enable Html format using below Function

    function set_content_type( $content_type ) {
        return 'text/html';
    }
    add_filter( 'wp_mail_content_type', 'set_content_type' );

    After update all mail go with plain text.

    How can i enable content type html?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must have a plugin that affects how WordPress delivers email. Can you list what plugins you have active?


    nilay89
    Participant

    @nilay89

    Sorry I am not getting well

    You must have a plugin that affects how WordPress delivers email.

    Are you talking about any plugin for email? If yes, I am not using any plugin for send mail but I am using SMPT mail with override wordpress “phpmailer_init” function

    See below function

    add_action( 'phpmailer_init', 'wpse8170_phpmailer_init' );
    
    function wpse8170_phpmailer_init( PHPMailer $phpmailer ) {
        $phpmailer->Host = 'smtp.gmail.com';
        $phpmailer->Port = xxx; // could be different
        $phpmailer->Username = 'xxx@gmail.com'; // if required
        $phpmailer->Password = 'xxx'; // if required
        $phpmailer->SMTPAuth = true; // if required
        $phpmailer->SMTPSecure = 'tls'; // enable if required, 'tls' is another possible value
    
        $phpmailer->IsSMTP();
    } 

    nilay89
    Participant

    @nilay89

    Any Solution For this?


    justarandomuser
    Participant

    @justarandomuser

    Same problem here!

    I am using the plugin “Postman SMTP”. But emails are not sent with css styles in v2.5.

    With the following in functions.php, the mails are sent in text/html

    add_filter( 'wp_mail_content_type', 'set_content_type' );
    function set_content_type( $content_type ) {
      return 'text/html';
    }

    Without they are sent in text/plain. But with or without, the emails never look like in the customizer.

    @justarandomuser Please don’t post the same thing on multiple topics. If you find yourself wanting to do that, it’s best to just create a new discussion topic for better visibility. I’ve replied on your other topic.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘After Update buddypress 2.5, Mail not send html fromat’ is closed to new replies.
Skip to toolbar