Movable Type And Mailman, Part 2

How to integrate Movable Type weblog software with Mailman mailing list software to deliver excerpts from your weblog to subscribers via e-mail. Plus how to customize Movable Type’s e-mail message.

The test worked, albeit with a few modifications to Movable Type. Here’s what I did to send notifications to subscribers about new entries on my weblog.

  1. Create a Mailman mailing list to which users can subscribe.
  2. From the Movable Type “Notifications” menu, add the e-mail address of the mailing list as the sole entry in the “Notification List” section.
  3. Create a new entry and post it to your weblog. When you post it, post an excerpt as well (which is cleaner than relaying on the MT defaults).
  4. From the Movable Type “Edit Entries” section, select the entry you just posted and open it for editing.
  5. From the “Edit Entries” section, scroll down to the “Advanced Options / Send a notification” section, check the “Include exerpt” box, and click the “Send” button.
  6. The weblog owner should receive a copy of the e-mail immediately. Since Movable Type uses “Bcc” (by default) to send e-mail, Mailman will reject the post and send a message to the list moderator for approval. (Mailman will reject the message with “Message has implicit destination” as the reason for rejection. This means that Mailman doesn’t like posts via Bcc.)
  7. Login to Mailman’s web-based administrative interface for your list and approve the message.

The above will work, but Movable Type weblog publishers may want to customize the e-mail message that gets sent out. The weblog owner will receive a message that looks like this:

Date: Mon, 2 Jun 2003 12:05:07 -0600 (MDT) 
Subject: Clock Tower Law Group Update: Movable Type and Mailman 
From: info@clocktowerlaw.com 
To: info@clocktowerlaw.com 


((((((((((((((((((((((( Movable Type and Mailman )))))))))))))))))))))))


                             June  2, 2003



------------------------------------------------------------------------


    How to integrate Movable Type weblog software with Mailman
    mailing list software to deliver excerpts from your weblog to
    subscribers via e-mail.


------------------------------------------------------------------------


http://www.lawlawlaw/movable-type-mailman1.html





-- 
Powered by Movable Type
Version 2.63
http://www.movabletype.org/

The current version of Movable Type does not contain a template for editing this e-mail message. There is a good discussion on the Movable Type support forum about this (http://www.movabletype.org/…) (search for “Template for notification e-mail” if that URL doesn’t work).

To customize the e-mail message, edit (in the directory where your CGI scripts live) the “send_notify” routine in the “lib/MT/App/CMS.pm” file. I also wanted to remove the MT signature at the end of each message, because if I send five excerpted posts to my Mailman list and then send those five posts in batch mode to subscribers, I’m going to end up with one e-mail message with five MT signatures. To remove the signature, I edited the “version_slug” routine in the “lib/MT.bin” file and the “send” routine in the “lib/MT/Mail.pm” file. This gave me a much more concise e-mail message:

Date: Mon, 2 Jun 2003 14:38:15 -0600 (MDT) 
Subject: Movable Type and Mailman 
From: info@clocktowerlaw.com 
To: info@clocktowerlaw.com 


* Movable Type and Mailman


How to integrate Movable Type weblog software with Mailman mailing
list software to deliver excerpts from your weblog to subscribers
via e-mail.
http://www.lawlawlaw/movable-type-mailman1.html

And after I approve the post from the Mailman interface, the final message (to subscribers) looks like this:

From: info@clocktowerlaw.com 
Bcc: 
Subject: [LawLawLaw] Movable Type and Mailman 
Sender: lawlawlaw-admin@clocktowerlaw.com 
X-BeenThere: lawlawlaw@clocktowerlaw.com 
X-Mailman-Version: 2.0.13 
List-Help:  
List-Post:  
List-Subscribe: , 
         
List-Id: IP Law Newsletter by Erik J. Heels  
List-Unsubscribe: , 
         
List-Archive: 
Date: Mon, 2 Jun 2003 14:38:15 -0600 (MDT) 


* Movable Type and Mailman


How to integrate Movable Type weblog software with Mailman mailing
list software to deliver excerpts from your weblog to subscribers
via e-mail.
http://www.lawlawlaw/movable-type-mailman1.html





_______________________________________________
LawLawLaw mailing list
lawlawlaw@clocktowerlaw.com
http://www.clocktowerlaw.com/mailman/listinfo/lawlawlaw

A perfect solution? No. But a workable one. It’s worth noting that you can send full-text messages as well as excerpts, but they will include any HTML that you entered when you posted the entry. So there’s room for improvement here. Like an HTML2text converter, or, better yet, a future version of Movable Type with an e-mail template built in (and it is on their radar screen).

Leave a Reply

Your email address will not be published. Required fields are marked *