Tagged: html mails, plain text
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?
- Brajesh Singh on July 31, 2016 at 10:48 pm #4852
Which plugin are you using for enabling MailGun? Most probably it is not underatnding the html email headers.
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 🙂
- Brajesh Singh on August 2, 2016 at 3:16 am #4870
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 [firstname.lastname@example.org 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 6 years, 10 months ago by lavish.
- Brajesh Singh on August 2, 2016 at 7:52 am #4877
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.