Search interesting materials

Sunday, March 04, 2007

How to make email to blogger work

One of the neat features of blogspot used to be submission of blog postings by email. Email->blogger is highly convenient for me, particularly because I write most of my blog postings when offline. When I moved to the the new software release in January 2007, this feature stopped working. The interactive authoring component that blogspot has is inconvenient and buggy.

With a little help from my friends, I figured out how to do email to blogger. To the best of my knowledge, this information isn't yet on the net, so here goes.

The key insight is that the email that must be submitted to blogger must have content type text/html and must have only one object in it (the HTML content). There must be no attachments or anything else.

Generic receipe using sendmail

This works as long as you have a machine with a working MTA. Regardless of what your MTA is, generally there is an executable named "sendmail" where many flags of sendmail are respected.

Incantations specific to one MUA - mutt

Make an HTML file posting.html starting with until . Bring it into the text of the email using mutt by saying:

$ mutt -i posting.html myblogemailaddress

This puts you into an interactive editor screen. Fill in the title of the post under `Subject:' and exit the editor.

Now you will face the mutt menu screen. There is no attachment, there is only an email that you've been writing `by hand'. Say Ctrl-T to change from text/plain to text/html and send.

Weaknesses

I haven't figured out how to place labels into the HTML that's submitted. As a consequence, I go into the blogspot interactive screen to tag the posting with labels. That's tedious, and further, blogspot emits one more entry into the RSS feed when the labels are added or modified.

5 comments:

I managed to post my del.icio.us links to Blogger. It seemed that mailing them was one of the solutions. My Perl script is using a mail sender package that I configured for HTML mail. Voila. Just like you I'm missing a way to add labels in the mail. Flickr has a syntax of mixing tag:anylabel in the subject or in the body. I will look further if Blogger has any support for labels in the mail. Otherwise this could be a enhancement request for Blogger.

I am using an SMTP Relay to send messages via an ASP script to Blogger blog. But I cant find a way to publish images by that.

I use an HTML type posting with images embedded via src=cid: in my HTML post, but the images dont appear.

I however found that....Invite friend option on www3.phonerotica.com sends the embeded images successfully via email and those posting appear properly in BLOG.

Do you know or let me know ... what modifications in my HTML or Script[Any PHP or ASP] do I need to do to either embed or attach the file that it automatically gets saved and displayed on blog..via blogger server.

um. I'm also doing 'cid'I embeded my pictures into the e-mail with thunderbird, and when it sent it seemed to attach the image as:<img src="cid:part1.06030708.03070203@gmail.com" height="300" width="400">

Which is a bad address.Normally when I simply attach the pictures it works fine. Apparently this 'cid' thing didn't work with blogger?

However, it seems cid does not work but instead attaching the image with a line in body of message in script works for posting, where msg comes afterwards.

However, phonerotica thing works, try sending an invite mail from phonerotica wap site and it gets posted to your blog via blog to email address in a well fashioned manner and with embedded images, not using cid but images do get saved to blogger account automatcially.

Please note: Comments are moderated. Only civilised conversation is permitted on this blog. Criticising me is perfectly okay; uncivilised language is not. I delete any comment which is spam, has personal attacks against anyone, or uses foul language. I delete any comment which does not contribute to the intellectual discussion about the blog article in question.

Please note: LaTeX mathematics works. This means that if you want to say $10 you have to say \$10.