Looks reasonable, I will give it a shot...
Looks reasonable, I will give it a shot...
You can check out a message I posted on my WP blog using this setup. I posted it using Eudora on Windows XP. I'll try from another mailer and see what happens.
<rb>
I posted two additions emailed blog entries. One was from a web-front end to Outlook, the other from a normal webmail application. Both posted and posted to the correct categories.
I did notice that the Outlook message has what looks like a linebreak character (it represents a LF as an '=' character.) Not certain what to do about that at this point.
Honestly, I won't be using a blog by email feature much, if at all. For remote posting, I use w.bloggar.
<rb>
Which version of WP have you guys tested this on?
Beel Your solution is much more elegant than mine. Using one additional argument, rather than several statements, as my example used, is simpler.
I've modified my version here based on your suggestions.
Thanks.
<rb>
I'm using the current CVS.
<rb>
Now all we need is to use the default category if none is submitted in the e-mail. Shouldn't be difficult but I have to run to a meeting - if you go ahead and do it please let me know so I don't spend time on it.
Well, I guess the meeting was cancelled. If no category is set in the e-mail, changing to this will give you the default category set in admin:
if (empty($post_categories[0])) {
$post_categories[0] = get_settings('default_category');
But in testing this I realized in the "Writing by Email" settings one selects by category name, not ID. To maintain consistency, I think that is the next thing I will change in wp-mail.
Instead of
$blah = explode("\n", $content);
$firstline = $blah[0];
$secondline = $blah[1];
why not
list($firstline, $secondline) = explode("\n", $content);
?
I made the changes and now everything works except the body of my post does not show up. The title only.
John
This topic has been closed to new replies.