Hello,
Thank you for your feedback and for pointing me to the code section. I was able to investigate the source of the problem.
First, let me give you some background. A few years ago, I successfully installed your plugin, and my site was able to send emails without needing a specific SMTP configuration. However, a few weeks ago, my site stopped sending emails. I assumed that my provider had increased SMTP security by requiring authentication. To address this, I installed a plugin called Gmail SMTP, which allowed me to configure my new mailbox correctly. This plugin uses the native
wp_mail
function. Although I was able to send emails, I couldn't receive emails from BuddyPress (BP). To fix this, I had to install another plugin called Vibe BuddyPress to WP Mail Fix, which resolved the issue.
However, the emails I received were in plain text format.
I then started analyzing your code. Despite using the latest version of BuddyPress, since I’m now using wp_mail
, the code branch being used is the one for older BuddyPress versions:
https://github.com/boonebgorges/buddypress-group-email-subscription/blob/efb91a1553d21a609e60aa7c739e423106c6e765/bp-activity-subscription-functions.php#L1091
Instead of the branch used for BuddyPress 2.5+ versions:
https://github.com/boonebgorges/buddypress-group-email-subscription/blob/efb91a1553d21a609e60aa7c739e423106c6e765/bp-activity-subscription-functions.php#L1011
To avoid HTML being converted to plain text, I removed the convert_html_to_text
function on line 1355:
https://github.com/boonebgorges/buddypress-group-email-subscription/blob/efb91a1553d21a609e60aa7c739e423106c6e765/bp-activity-subscription-functions.php#L1355
Question: Why is the content being converted to plain text when using wp_mail()
?
Additionally, this is more of a cosmetic issue, but when using this branch, the email content format differs from the format used with bp_send_mail
. Why is that? Is it possible to have the same format for both methods?
Form information, when I forced BP using add_filter as you advice, no email was sent. Moreover, after removing the code, I had to uninstall and install again your plugin to have it up and running.
Thanks for your help and support.
Best regards,
Nicolas