[resolved] Post by Email (3 posts)

  1. therealhopeful
    Posted 9 years ago #

    Hello. Is there a way to configure WordPress so that it is possible to submit posts by email? Preferably, it would be nice if WordPress would hold the post as a draft until it can be editted/approved. Thanks. :)

  2. therealhopeful
    Posted 8 years ago #

    Is this possibly a bug related to WP2.2? Would upgrading to 2.2.1 fix this?

  3. icr8stf
    Posted 8 years ago #

    I saw in the wp-mail.php file this section of code that should help you.

    // or maybe we should leave the choice to email drafts? propose a way
    	$post_status = 'publish';
    	$post_data = compact('post_content','post_title','post_date','post_date_gmt','post_author','post_category', 'post_status');
    	$post_data = add_magic_quotes($post_data);
    	$post_ID = wp_insert_post($post_data);
    	if ( is_wp_error( $post_ID ) )
    		echo "\n" . $post_ID->get_error_message();
    	if (!$post_ID) {
    		// we couldn't post, for whatever reason. better move forward to the next email

Topic Closed

This topic has been closed to new replies.

About this Topic