Plain text mail Buddypress

Home Forums Legacy Support Support queries Other issues Plain text mail Buddypress

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #250033
    dianabokje
    Participant
    I've read all the topics about buddypress sending plain text in stead of htlm mail. One solution even helped: when I put this code: add_filter( 'wp_mail_content_type', 'set_content_type' ,9999999); function set_content_type( $content_type ) { return 'text/html';} in the wplms customizer plugin it works. But now my welcome mail and activation mail ar unreadable because they are HTML-coded but send in plaint text. I als tried this solutions in the wplms customizer plugin: add_filter( 'bp_email_use_wp_mail', function() { return true; },99); and this add_filter( 'bp_email_use_wp_mail', function() { return false; },99); But then the buddypres mails are HTML-coded but send in plaint text. Now I have installed the WP mail SMTP plugin. Same result: the welcome mail and activation mail are fine, but the buddypress mail are HTML-coded but send in plaint text. Could you help me find a solution? Is send you my admin password in a private message Thank you in advance, Diana
    #250035
    dianabokje
    Participant
    This reply has been marked as private.
    #250376
    Veronica
    Moderator
    hi,

    Please make sure that you have saved the buddypress emails template for once in your wp-admin -> apperance  -> emails .

    second thing is to check if you are using a plugin to send email that sets wp email content type to html or using a plugin to send emails ?if yes then try deactivating it.

    you should save your email template styling from apperance -> emails ,change some colors in it and save it .
    then deactivate all your third party plugins in your site and check this again ,(check activation email )  .
    if it still does not works then deactivate postman smtp and  try :
    https://vibethemes.com/documentation/wplms/knowledge-base/wplms-mail-smtp-gmail-smtp/
    #250437
    dianabokje
    Participant
    Hi Veroncia, Thanks you very much for your answer. I'm very happy with WPLMS and the e-mail is the last step I have to take to run a perfect website. I'm very pleased with it. I had already installed wplms mail as you suggested, but that didn't solve the problem. When i deactivated the plugin and took all the steps you send I didn't receive a mail at all. Even with all thrid party plugins where deactivated nothing happens I save the email templates again, changed the colors in the appearance. Now I activated the plugins again (wtih accaption of the cashe plugin), took all steps again. The e-mail is sent now, but I stil have te same problem. Is there a next step?  
    #250592
    Anshuman Sahu
    Keymaster
    Well the issue actually relies with buddypress itself .   buddypress checks if wp_mail function is being overwrite along with the type of email text or html and then return opposite of it .We do no know why they do that .   try adding this code as well in your wplms customizer plugin : add_filter( 'wp_mail_content_type', function( $content_type ) { return 'text/html'; },9999999); to force the content to html  
    #250615
    dianabokje
    Participant
    Hi Alex, It works when I deactivate my wp-mail-smtp plugin. The news mails look good. The welcome and activation mails are plain text but without HTML coding. It would by nice if they should also be HTML, but if that isn't possible its fine for me. thanks  
    #250991
    Veronica
    Moderator
    This reply has been marked as private.
    #251003
    dianabokje
    Participant
    Hi Veronica,   I don't recognize your screen, everything is working fine when I try to replicatie this. So I don't understand. May be it was because I was logged in with the same account. I don't know. I made a pdf with screenshots. You can download them here. I made some changes Yesterday because the course news wasn't send well. It was a plain text mail,  So I put WP-mail-SMTP back on. Now my welcome mail is ok and look good in HTML, But the course news still doesn't. Thanks in advance. I think you can login now if you want.
    #251299
    Veronica
    Moderator
    hi,

    Go to wp-admin->Plugins->Editor->Choose WLMS Customiser Plugin.

    Edit the wplms-customiser.php file

    Add this code and save. Refer to this Screenshot : https://prntscr.com/fe50km

    add_filter( 'bp_email_use_wp_mail', function() { return false; },99);

    try this waiting for your response on this.
    #251316
    dianabokje
    Participant
    Hi Veronice, I allready did so, but it did'nt help at all

    I've tried this solutions in the wplms customizer plugin:

    add_filter( 'bp_email_use_wp_mail', function() { return true; },99);

    and this

    add_filter( 'bp_email_use_wp_mail', function() { return false; },99);

    But then the buddypres mails are HTML-coded but send in plaint text.

    #251510
    Veronica
    Moderator
    hi, try In \wp-content\plugins\buddypress\bp-core\bp-core-functions.php there is a line with "content_plaintext". Just change it to "content_html" try the above one and then check if it is not going to work then share your ftp/cpanel to check the code.
    #251535
    dianabokje
    Participant
    Dear Veronica, Just to be sure I took all the steps over again. Including your last suggestion. It still doesn't work. 12:19 WP-mail smtp is activated No changes in wplms-customizer.php or buddypress core-fucntion.php result: - course news mail:nice e-mail template with plain text with  html code within - welcome mail looks fine, nice e-mail template with html 12:27 changed line 3201 buddypress core-function.php content-plaintext to content-html result: course news mail:nice e-mail template with plain text with  html code within 12:30 add the line  add_filter( 'bp_email_use_wp_mail', function() { return false; },99); to wplms-customizer.php again result: course news mail:nice e-mail template with plain text with  html code within 12:34 above line outcommended and: add the line  add_filter( 'bp_email_use_wp_mail', function() { return true; },99); to wplms-customizer.php again result: No e-mail was send 12:37 above line outcommended and: add the line add_filter( 'wp_mail_content_type', function( $content_type ) { return 'text/html'; },9999999);  again result: course news mail:no e-mail template with plain text with  html code within no paragraphs, all the text is written after each other. 12:43 above line outcommended so no alterations in wplm-cusotmizer.php - course news mail:nice e-mail template with plain text with  html code within 12:53 changed line 3201 buddypress core-function.php back to content-plaintext result: course news mail:nice e-mail template with plain text with  html code within 12:56 add the line  add_filter( 'bp_email_use_wp_mail', function() { return false; },99); to wplms-customizer.php again result: course news mail:nice e-mail template with plain text with  html code within 12:58 above line outcommended and: add the line  add_filter( 'bp_email_use_wp_mail', function() { return true; },99); to wplms-customizer.php again result: No e-mail was send 12:59 above line outcommended and: add the line add_filter( 'wp_mail_content_type', function( $content_type ) { return 'text/html'; },9999999);  again result: course news mail:no e-mail template with plain text with  html code within no paragraphs, all the text is written after each other. 13:01 above line outcommended so no alterations in wplm-cusotmizer.php and no alterations in buddypress core-function.php back to the situation at 12:19 result: course news mail:nice e-mail template with plain text with  html code within I sent you my ftp-information in a private message
    #251536
    dianabokje
    Participant
    This reply has been marked as private.
    #251893
    Veronica
    Moderator
    hi, the only option we have left now is to add:   function wpse27856_set_content_type(){ return "text/html"; } add_filter( 'wp_mail_content_type','wpse27856_set_content_type' ); or function wpse27856_set_content_type(){ return "text/pain"; } add_filter( 'wp_mail_content_type','wpse27856_set_content_type' ); add the one and then check if doesn't work then try with another one. still doesn't solve. then we don't have the idea about this because

    this is something related to buddypress itself .We do not interfere in this functionality.

    you need to contact buddypress for this as this code is not related to wplms theme.

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Plain text mail Buddypress’ is closed to new replies.