All pastes #447007 Raw Edit

Unnamed

public php v1 · immutable
·published 2007-04-18 19:52 UTC
rendered paste body
function test_emailer($post_ID) {	global $wpdb;		$email = "glenn@deeperdevotion.com";	$post = $wpdb->get_row( "SELECT post_date, post_title, post_content FROM $wpdb->posts WHERE ID = " . $post_ID );	$content = $post->post_content;		$blogname = get_settings( "blogname" );	$subject = "DEEPERDEVOTION.com- " . $post->post_date;	$text .= $content" ;		mail( $email,		  $subject,		  $text,		  "From: $email\nContent-Type: text/html;charset=utf-8"		);}add_action('publish_future_post', 'test_emailer', 10, 1);?>