WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Post by email problem (7 posts)

  1. cip6791
    Member
    Posted 8 months ago #

    I m having some issues when posting by email using Gmail. When I forward an email to the Jetpack generated email address, because of the text that is added to the email:

    ---------- Forwarded message ----------
    From: me <me@gmail.com>
    Date: Sun, Oct 13, 2013 at 7:53 AM
    Subject: My title
    To: me@gmail.com

    The post gets published even though the status is draft.

    [title My title] [status draft]

    I tried stripping everything before [title, which works when publishing a post from the dashboard, but when I forward the email the post still gets published and I really don't want it to do that.

    //strip unwanted text/code from posts
    function changePost($data, $postarr) {
    
    $da_content = $postarr['post_content'];
    
    if (strpos($da_content,'[title') !== false) {
      $data['post_content'] = strstr( $postarr['post_content'], '[title' );
    }
    
    return $data;
    }
    
    add_filter('wp_insert_post_data','changePost','99',2);

    Any ideas on how to delete the Gmail forward text message? I checked on the gmail forum, but they said I have to do it manually, and that's something I don't want to do either.

    http://wordpress.org/plugins/jetpack/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 8 months ago #

    Could you try to move the status shortcode to the bottom of the email, and let me know if it helps?

    If you still experience issues, could you let me know your site URL here so I can have a closer look at our logs?
    If you want it to remain private, you can also contact us via this contact form:
    http://jetpack.me/contact-support/

    Thanks!

  3. cip6791
    Member
    Posted 8 months ago #

    The shortcode is at the bottom of the email. It's not the position of the shortcode .. .in my opinion ... it s the forward text that's messing with the posting.

  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 8 months ago #

    Could you let me know your site URL so I can have a closer look?

    Thanks!

  5. cip6791
    Member
    Posted 8 months ago #

  6. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 8 months ago #

    Thanks! I checked a few of your latest Posts by Email, and I'm afraid we won't be able to fix it.

    Post By Email currently strips out email signatures and quoted text (from previous emails) so they don't appear in your posts. As a result, it also strips out anything that is quoted when you send out an email including content forwarded from a previous email. The forwarded content is removed when WordPress.com processes the email, so you won't be able to modify this behaviour on your site.
    You will consequently need to delete this email header manually.

  7. cip6791
    Member
    Posted 8 months ago #

    Nice :)

    Thank you very much.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags