WordPress.org

Ready to get started?Download WordPress

Forums

Postie
Assigning categories to email addresses? (6 posts)

  1. shenry
    Member
    Posted 1 year ago #

    Can you tell me if there's a way I can assign certain emails to publish when received, to specific categories. For example: John@gmail.com sends an email with the subject, ABC store: ABC store. This will publish in the ABC store category, with a headline of ABC store. I want to ensure that he only publishes to that category. As is, he could add a category in the subject line and post to any category.

    http://wordpress.org/extend/plugins/postie/

  2. Wayne Allen
    Member
    Plugin Author

    Posted 1 year ago #

    You can build a Postie addon to enforce this rule. See http://postieplugin.com/extending/
    If you need help with coding contact me at postie-help@devzing.com

  3. shenry
    Member
    Posted 1 year ago #

    Excellent, thank you

  4. adavila78
    Member
    Posted 11 months ago #

    I know you are busy so I will be brief

    I have a blog that based on the email of the person that sents the email, a category gets assigned for the post...

    This is the code I am using for postieFilter.php, and checks if the email is such, then it assigns two post categories... however when debugging, categories are blank and nothing ends up being posted even though a post id was assigned, I suspect I am assigning the categories wrongly? This is my code:

    function change_email($email) {
    if (stristr($email, 'admin@al***********.com')){
    $post['post_category']=array(4,37);
    return ($post);}
    }

  5. adavila78
    Member
    Posted 11 months ago #

  6. Wayne Allen
    Member
    Plugin Author

    Posted 11 months ago #

    The variable $post isn't defined in your function so any changes you make to it are lost. I assume you are calling this from another function and should pass in $post as well.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic