Aron Atkins has updated mail2entry, the PERLPython script that Sen wrote for posting email with attached pictures to MT.
This version includes:
- parsemsg.parse supports multiple image attachments; the content of each image is returned in a list.
- Added saveimage.py, which takes that list of image bodies and either saves them to disk or posts them via newMediaObject.
- Move parsing of sys.argv out of main() -- this avoids the import * warnings.
- Template changes in settings.py which allow for multiple images. supports both
- JPEG and GIF image types.
His site is at here and the code is here.
Also, I have been talking to Karl Dubost about taking over the management of the code and he is also working on a new version. If you guys could coordinate, that would be great. ;-)
Thanks to both of you for continuing the effort!
Those are actually Python scripts. Not PERL ;-)
is that to mean I can email images from anywhere straight to my MT??
if it does I'd so kiss you man!!
Oops. You're right. PERL. Gnome-girl, yeah, email to images to MT. That's what I'm using for my moblog.
welcome back japan
we'll try Moblog for JBA this time
thanxs
Pretty cool, does it allow for posting of text as well? Been searching for such a tool, but unfortunately 'Moveable Type post from email' is one of those google busting collections of search terms cause my computer to flashback toward 1997 results.
The subject of your email becomes the title of the blog post.
Text attachments are supported as long as there is only one and it is first attachment.
Other attachments are expected to be either GIF or JPG images.
The resulting blog entry is determined by the content of the email. It is arranged according to the format of the entry template (provided to mail2entry).
The mail2entry script requires Python2.2 or higher.
"is that to mean I can email images from anywhere straight to my MT?"
I presume that you have to run the python script on your computer. This cript will check a mailbox somewhere, and then post the email contents to the Weblog.
You cannot post "directly" to MT.
Am i right ?
Note: David Davies has made a great job in integrating moblogging into Radio UserLand.
Check his photos (and videos!) posts here :
http://radio.weblogs.com/0001161/categories/smsblog/
And his assetManager tool here :
http://radio.weblogs.com/0001161/stories/2003/02/26/assetmanagerTool.html
And his "Mobile blogging how-to guide" here :
http://radio.weblogs.com/0001161/stories/2003/02/26/mobileBloggingHowtoGuide.html
JY.
Correct. MT does not directly receive email. The mobile device does not directly connect to the MT server.
If your mail is served from a Unix account, you may be able to add a procmail filter. This processes all incoming mail as it arrived. If the incoming email matches certain criteria, the mail2entry script is called and a MT post results.
I've put a little information about my configuration on my moblog in progress.
Hiya All,
It would be great iff some one just make a step to step guide to get this baby to work.
Tried to install it, but no luck so far.
Greetz to U all!
Thanks for the code. I ran into some problems. Fortunately, I was able to figure out Python and fix them.
1) In mail2entry.py, result needs to be defined outside of the try block. If an exception happens, then try is undefined.
2) In saveimage.py, you need to add "import os" and "from stat import *".
Here is a script file for sendmail and some install instructions. I know next to nothing about sendmail but I got this working by performing lots of google searches.
#!/bin/bash
#
# SETUP:
#
# goto sendmail script directory
# cd /etc/smrsh
#
# copy this file here
# cp /path/to/mail2entry .
#
# unpack archive
# tar xvzf /path/to/mail2entry-2003-03-10b.tgz
#
# change permissions
# chown -R mail mail2entry*; chgrp -R mail mail2entry*
# chmod u+rx,go-rwx mail2entry
#
# add to /etc/aliases
# hamzyblog: "|mail2entry "
#
# update aliases.db
# newaliases
#
# send test mail to hamzyblog@...
#
# see if it worked
# vi /var/log/maillog
#
LOCATION=/etc/smrsh/mail2entry-2003-03-10
python ${LOCATION}/mail2entry.py ${LOCATION}/
The mail2entry tar balls been moved (slightly). Please find updated archives (as well as older ones) at:
http://www.gweep.net/~aron/mail2entry