Can I use a theme specific(a separate copy in my theme’s folder) PHPMailer
Class for sending emails?
I am asking this because I have some issue on using wp_mail()
, It’s not taking header, I have searched and got many infos related to use Filters for header name and mail, but its not working, might be because of some plugin activated.
So is it possible to add PHPMailer class, and use it in ajax callback functions?
I tried but site goes blank.
WP already uses PHPMailer in its implementation of
wp_mail
… You may have to do a little digging to get at it, but you should be able to either make use ofwp_mail
‘s PHPMailer instance, or at least load it from WP’s default libraries without having to bundle another copy.That you can even contemplate adding a functional library like PHPMailer to a wordpress theme shows what a disaster the design of WP’s themes is! Repeat after me: “separation of concerns!”