jrobinsonc
5/8/2014 - 2:08 AM

Send emails in WordPress

Send email in WordPress

<?php

/**
 * Set body as HTML.
 */
function set_html_content_type() 
{
    return 'text/html';
}

add_filter('wp_mail_content_type', 'set_html_content_type');
wp_mail('test@server.com', 'Subject', 'Message');
add_filter('wp_mail_content_type', 'set_html_content_type');