Send email from WordPress

Try to add some code to the functions.php like:


function send_email() { // write some code with wp_mail function. }

I think you can use the $post to get the post info.

For comments I guess you can use:

add_action('comment_post', 'send_email');

Let me know if you need some more help!