Posted in code, misc, tagged example, lamson, python, simplecode on November 13, 2010 |
1 Comment »
This is part 2 in a series, here is part 1.
In the last section, you should have got Zed Shaw’s LamsonProject running successfully through its unit tests.
Now I’ll show you how to make what maybe the *simplest* application with Lamson that you’ll ever see. All our application is going to do is:
- Receive emails with Lamson.
- Pull the content from the body and subject lines using python.
- Send the data to Google Calendar to be turned into a calendar entry using the quickAdd call, again using python.
Because Lamson is built to interact easily with Python code, this is snap. (more…)
Read Full Post »
Posted in code, misc, tagged example, lamson, python on November 13, 2010 |
2 Comments »
(quick install instructions)
If you’re a web programmer … and if you’re not, why are you reading this? … at some point you’ve wished you could integrate email into your webapp. Now, by integrate, I don’t mean sending emails … that’s trivial. Any language you can think of, there’s a library that will let you fire off all the html gibberish that fills your little hearts with joy.
The challenge comes when the little light goes off in your head and you think, “How hard could it be to have my app react to incoming email?” Maybe you’d like people to make forum posts by email, or create mailing lists ( listserv ) dynamically.
The answer used to be hard … very hard. A nightmarish mishmash of postfix, dovecot, procmail, pipes, and the odd custom script would get you something that might, maybe, let you fire off a script when a new email came in. Actually passing email data to your app? Forget it. And after all that, most people would rightly wash their hands of it and say ‘let’s just poll the mail server periodically’ … ick.
Why can’t I just convert emails to HTTP POST’s sent to an endpoint on my webapp? Oh … wait, I can, thanks to Zed Shaw’s LamsonProject.
But first, before going to the trouble of setting LamsonProject up, please be aware that there exist several semi-respectable SAAS companies trying to do this for you:
- SendGrid Parse API : Email to POST. I’ve never heard anything bad about SendGrid ( a fair amount of good stuff ) but the it is a sideline to their main business of outsourcing your SMTP server for you.
- Email Yak : Email to XML, Email to JSON, Email to POST. In private beta. Don’t confuse with yak mail or yak messenger.
- Cloudmailin : Email to POST … “just like a webhook”. In beta.
Honestly, if I had two nickels to rub together I’d probably use SendGrid, but I don’t … so here we are. On with the show!
Read Full Post »