WordPress Post HTML after Posting

add_action('publish_post', 'email_post');
function email_post($postID)
{
    $post = get_post($postID);
    $content = $post->post_content;
    $content = apply_filters('the_content', $content);
    $content = str_replace(']]>', ']]>', $content);
    $mailto = 'youremail';
    $subject="New Post";
    if(mail($mailto, $subject, $content))
        return true;
    else
        return false;
}

Be sure to set your headers or anything else you might need to populate your email correctly. This is untested, but it should help get you started. Also consider using the ‘save_post’ hook.

I’ve posted this same reply on StackOverflow, so if this helps, please mark both of these as answered.

tech