Tagged: html mails, plain text
Hi!
After facing an issue of no activation emails being sent to my users. I setup MailGun for my bp emails.
The problem is with MailGun all emails are being sent as plain text. As soon as I disable MailGun emails become HTML again. I have to keep mailgun because delivery without it is not being reliable.
Can you guys advise something?
Thank you
Hi Lavish,
Which plugin are you using for enabling MailGun? Most probably it is not underatnding the html email headers.Hi Brajesh!
I am using MailGun for WordPress plugin – https://wordpress.org/plugins/mailgun/. Can you recommend me some other email solution, that’s free to use and doesn’t break bp html email format?
This may throw some light on the issue – https://buddypress.org/support/topic/buddypress-emails-default-text/#post-254255
Thank you 🙂
Hi Lavish,
I looked at the mailgun plugi and BuddPress implementation both. If you enable plaintext email, Mailgun will be able to deliver(Since Mailgun overrides wp_mail) but if you need html template, Then A specific implementation for BP_PHPMailer is required.To enable fallback, you can put following in your bp-custom.php
add_filter( 'bp_email_use_wp_mail', '__return_true ' );
Hope that helps.
Thank you Brajesh for the code. I just tried and it seems that it is equivalent to disabling MailGun.
After adding the code :
1 – The emails are being sent from host assigned email [mail@mydomain.com via xxxxxxxxx.xxxx.xxxxx.theservername.xxx]
2 – Activation emails are (randomly) not delivering again
3 – It seems, mails sent during the use of code are not part of logs in MailGun dashboard. So, mails ain’t routing via MailGun
- This reply was modified 8 years, 3 months ago by lavish.
Hi Lavish,
Thank you for looking at it. I will check a little more and will post back later. I am not sure about the reason. The MailGun plugin overrides wp_email and using the above filter forces BuddyPress to use wp_email instead of new methods.Will have more details once I do a few tests today.
You must be logged in to reply to this topic.