Thursday, May 26, 2016

How To Send Emails Using WordPress


Use the wp_mail() functions. These functions let you use built-in WordPress awesomeness to send emails to users.$message = 'Hello, thanks for rding my post! I hope to see you back soon.'; wp_mail( 'someonesemail@example.com', 'Thanks for rding my post!', $message);


You can also send HTML content by using a filter:add_filter ("wp_mail_content_type", "smashing_mail_content_type"); function smashing_mail_content_type() { return "text/html"; }

No comments:

Post a Comment