Home › Forums › Legacy Support › Support queries › Other issues › Plain text mail Buddypress
Tagged: buddypress, html, Plain text
- This topic has 13 replies, 3 voices, and was last updated 4 years, 7 months ago by Veronica.
-
AuthorPosts
-
April 9, 2020 at 7:32 am #250033dianabokjeParticipantI'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, DianaApril 9, 2020 at 7:33 am #250035dianabokjeParticipantThis reply has been marked as private.April 10, 2020 at 10:22 am #250376VeronicaModeratorhi,
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/April 10, 2020 at 1:06 pm #250437dianabokjeParticipantHi 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?April 11, 2020 at 10:53 am #250592Anshuman SahuKeymasterWell 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 htmlApril 11, 2020 at 12:07 pm #250615dianabokjeParticipantHi 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. thanksApril 13, 2020 at 1:28 pm #250991VeronicaModeratorThis reply has been marked as private.April 13, 2020 at 2:00 pm #251003dianabokjeParticipantHi 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.April 14, 2020 at 1:22 pm #251299VeronicaModeratorhi,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.April 14, 2020 at 1:48 pm #251316dianabokjeParticipantHi Veronice, I allready did so, but it did'nt help at allI'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.
April 15, 2020 at 8:38 am #251510VeronicaModeratorhi, 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.April 15, 2020 at 11:04 am #251535dianabokjeParticipantDear 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 messageApril 15, 2020 at 11:07 am #251536dianabokjeParticipantThis reply has been marked as private.April 16, 2020 at 1:16 pm #251893VeronicaModeratorhi, 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 becausethis 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.
-
AuthorPosts
- The topic ‘Plain text mail Buddypress’ is closed to new replies.