Posting to WordPress MU by Email Part 2

THIS POST IS OBSOLETE

Warning: This post contains material of a technical nature, if you start reading and feel dizzy or nauseous then stop reading immediately and go and lie down.

This is a follow up to my previous post where I outlined a prototype of an extension for WPMU which allowed posting to multiple blogs from one centralised POP3 account which collected all posts from all users of all blogs. This is very different from the usual way of doing it where you either go out to get the emails from external email addresses or you have multiple local accounts.

Well the prototype has, like Frankenstein’s Monster, come alive and it’s now got configuration screens and lots of rich techy goodness to it.

I’m not going to go over the instructions on how to configure the MTA again, those are documented on my last post, and in the notes in the downloadable archive :

Post by Email-v1.zip – file removed

The Archive also contains instructions on where the TWO files need to be placed for the system to work.

What I’m going to cover here is the new features that I’ve added since the last post. Yes I have way too much time on my hands, but this is keeping my brain sharp so its all good at the end of the day.

These can be broken down into to distinct groups which are reflected in the two new options that will appear on the Settings menu:

Blog Level Options

These are options which are set by the blog administrator or blog owner:

Default Category for posts : This is a drop down of all categories and you select one to be the default category for posts without a category override

Optional Categories: This is a tick box list of all other categories in your blog, Toggle the ones you want users to be able to use in their category override.

Allow Posting By:  This is a tick box list of all the user who are members of your blog. Toggle the ones you want to be able to use the post by email. This will include YOUR address and by default no-one of them are checked (which basically deactivates the system for your specific blog).

User Level Options

These are options which are set on a user by user basis.

Personal Identifier : This is a optional text string which allows users to “secure” their posts. If this has been set then posts from them will be rejected outright. So set this to something good but memorable as you’ll have to provide it for each post.

Alternative Email: This allows you to nominate a secondary email address which the system will accept emails from. If you do not set this then posts will only be accepted from the email address registered to your account.

Additional Posting options

To support the “new” features there are now some additional posting options which you set at the top of your email.

wppbm-categories: A comma separated list of category names for this post. NOTE: This is names not numbers which makes it easier to remember (or are you so sad that you know the underlying IDs of your categories). You’ll find a list of the available categories on your user settings page. So assuming that the Administrator has enabled them you could do something like: wppbm-categories : computing,witterings which would post your post with those categories. If you do not specify this line then the default category set by the Administrator will be applied.

wppbm-pid: Your PID. If you’ve set your PID then you have to provide it here. If you’ve set it and don’t include it (or get it wrong) then your post is toast!

 

This entry was posted in Computing and tagged , , , , , , . Bookmark the permalink.

15 Responses to Posting to WordPress MU by Email Part 2

  1. Matt says:

    damn it, i missed out it currently doesn’t support posting to multiple blogs. I will have to keep waiting sadly :'(

  2. Steve says:

    No it doesn’t, It probably could do if I did some tweaking to make it parse multiple to addresses, or you could simply send the email a second time to the second blog.

  3. Matt says:

    Sorry for so many comments, I haven’t implemented it yet. But if I have one main blog and 4 sub blogs, users are just users and don’t own blogs themselves but can contribute content. Will this allow them to email their posts through to be able to contribute to the relevant blog then assign the relevant category?

  4. Steve says:

    Yes, if they can access the back end of the blog in question then they can set their privs.

    Also as the blog owner you’ll need to set it up for each blog, enabling the categories and the users.

    Then its just a matter of emailing blogname@your.email.domain and it should work out the rest! Well thats the idea

  5. Matt says:

    steve I wish to show you something, how can i contact you by email?

  6. Anonymous says:

    Nice post . keep up the good work

  7. Elena Coen says:

    Hello Steve,

    I’m hoping your plugin will do the trick for me but am unsure. What I need to do is post by email via one or more email accounts. I will subscribe to notifications by email from weather services, earthquake notifications, etc. and need each to post to its appropriate category. I won’t be able to get the sender to put shortcodes into the mail so I don’t know if there’s a third party way to automate this by somehow adding a signature on the resend or if by your plugin I can specific that email arriving from a certain address posts to one category, then email arriving from another address posts to another, etc. Can it accept posts from more than one address? I hope I’ve explained the task and really hope you have or know of the solution.

    Thanks, Elena

  8. Steve says:

    Elena, it wasn’t something I’d really considered – but it probably wouldn’t be too hard to add. The blog level options already have a category default so I could always add an additional block where you specificy incoming email address and the category you want it to post under so if the email was coming from say the USGS you could assign a default category of “Earthquake”.

  9. Anonymous says:

    I had two questions.

    1. What is the advantage of the user emailing theirwpmuloginid@example.com which is then dumped into a catch-all account vs. having the user email wpmuposts@example.com directly and checking the “from:” field in the email to determine username?

    It seems like it would require less server side configuration for the administrators to just check the “from:” field to determine user id, or would this require the site admin to keep track of the mapping of email addresses and user ids?

    2. Do you know if the virtual domain/catch all email setup is easily replicated on an Exchange Server?

  10. Steve says:

    Doing it this way means that a user can be subscribed to more than one blog – if you only use a single target address then you end up having to put a “target” into the email somewhere. Also it would allow you to easily extend the functionality so that the Blog Owner could change the target email address if he found it was being spammed.

    I have no idea if Exchange can support catchalls.

  11. Anonymous says:

    Does the script support connecting to the email account via SSL?

  12. Steve says:

    I suppose it could – but it doesn’t as I sort of assumed that the email server would be on the same server as the WPMU install.

  13. Ray says:

    Hi Steve,

    I’m interested in trying your plugin. However the .tar.gz file is corrupt according to WinRAR.

    Can you look into this?

    Also I have a question, do you know if WP 3.0 in network mode will enable the “Post via email” feature?
    http://codex.wordpress.org/Post_to_your_blog_using_email

  14. Ray says:

    Also just wondering what plugin you’re using for your comment moderation!

    I’ve never seen a separate screen where a user needs to click on a button to verify they are human!

  15. Steve says:

    Ray – I’ve recreated it as a zip file. Not sure what happened to break it because it was working earlier.

    Not sure how it will work with WP 3.0 – not something I’ve looked at really yet

    I use MontySpam (which is a WPMU specific plugin) which is probably what is doing the business with the button 😉

Comments are closed.