I have been working on a project that needs to occasionally send off emails. If you need to do so, here’s how with wp_mail():
add_filter(‘wp_mail_content_type’,create_function(”, ‘return “text/html”; ‘));
wp_mail(‘whoever@whatever.com’, ‘Subject’, ‘Message’);
Thanks to WordPress Cheat Sheets for the code!
Hi,
Is it possible to send SMS through function.php using a SMS gateway API?
Thanks,
Gaurab
LikeLike
You can definitely setup an SMS interaction, but I would write your own function rather than call into the mail function. Then just hook it in to run when you need it to.
LikeLike
Thanks so much for this information Zack, I was trying to figure out how to change the email subject in a theme I’ve downloaded.
I also want to tell you that I’m a Treehouse member and really like your lessons and your teaching style.
Thanks for everything, I just discovered your blog and I’m going to be coming back.
Cheers from Argentina.
LikeLike