Jan
18
2004

Movable Type to Dada Mail Script

This afternoon, I whipped up a script to archive and mail out blog entries every evening using Dada mail.

Jake from Utterly Boring, set me in the right direction, and I used this article as a starting point.

Right now my script sends multipart (text and html) messages, and archives either the html or the text, whichever you choose.

Since just about everyone uses mail clients that support html mail, I didn’t bother worrying about text only email, but it can very easily be hacked in. I’m still running tests, but it does work, so if anyone wants to help test email me and I’ll send it to you.

The script is meant to be run from a command line, so you need shell access to make it work. It is meant to be run as a cron job.

The script has the following options.

    --list           The short name of the list
    --list_address   The address of the list
    --my_address     The address of the administrator
    --html_page_url  The url of the html page to send
    --text_page_url  The url of the text page to send
    --subject        The subject you want the message to have
    --archive_html   Use this option if you want the html version archived
    --archive_text   Use this option if you want the text version archived

An example command line would look like this

    ./mt-send.pl --list='daily' \
                 --list_address='list@example.com' \
                 --my_address='owner@example.com' \
                 --text_page_url='http://example.com/daily.txt' \
                 --html_page_url='http://example.com/daily.html' \
                 --subject="Headlines for `date +'%B %e, %Y'`" \
                 --archive_html
Written by Aaron in: Software |

6 Comments »

  • Oh yes, this was developed in unix, but the only thing that I can see that will cause a problem in windows is the hocus pocus involved with getting the date into the subject line.

    Comment | 18/1/2004
  • test

    Comment | 29/7/2004
  • tset

    Comment | 29/7/2004
  • again

    Comment | 29/7/2004
  • test

    Comment | 29/7/2004
  • null

    Comment | 12/8/2004

RSS feed for comments on this post.

Leave a comment

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes