scriptygoddess

03 Jan, 2004

Using Dada/Mojo Mail to send MovableType Entries Nightly (or how to ditch Bloglet)

Posted by: Jennifer In: Scripts

Note: To pull this off, you'll have to invest $25. It's worth it for great mailing list software, but if you're a cheapskate, do not read past this point.

I've been a big fan of Mojo Mail (now called Dada Mail because somebody has too many lawyers and too much free time) for a long time. I set it up a year ago for my day job, and have loved working with it.

I recently purchased the Pro version of the software which came with the Magic Book. The $25 Magic Book is the key to this — it's loaded with tons of extra documentation, and it comes with a bunch of cool plugins. The one I like the most is an automated mailer that will send mailings at predefined intervals, pulling from Web pages. It's called Beatitude.

I've been using Bloglet to send nightly mailings of the headlines on the site. Bloglet, while, simple, isn't very flexible or powerful. So I thought, why couldn't Beatitude be used to send off MovableType nightly entries?

It now is on my site, in both a text and HTML formatted version. Sign up using the forms over on my site, and read on below to see how I did this.

First, you need the Dada Magic Book. That's the only way you're getting Beatitude (and the clickthrough tracking plugin, mentioned below as well). It's $25, which is wonderful for how powerful the thing is.

Second, here's the tricky part. MovableType and Dada are both hearty Perl scripts that rely on Perl library files installed in their directories, and they also have a couple of like folder names. When I tried to install it in a "dada" foler in my "cgi-bin" where MovableType was installed, things didn't seem to work. There were too many libraries that didn't want to play nice with each other. So I created a sub-domain (dada.utterlyboring.com) and installed it there. You may have better luck than I, but I know that's the only way I could get it to work.

Third, follow the install directions to install Dada and Beatitude properly. I'm not here to walk you through that, as there are great forums and documentation for that sort of thing (and the Magic Book purchase that's required to pull this off includes awesome documentation for both). If you have the money, the author of the software will install it all for you. But follow it all step-by-step and you should be fine.

Once it's installed and your CRON job is setup properly (if you don't know how or can't setup a CRON job, you can't do this), you need to create two new MovableType Index templates: One for the HTML version of the list, and another for the text-version of the list. You can set them up however you like. I set mine up so it takes the last day's entries, and then marked off the settings in Beatitude to only send if the mailing is different than the previous mailing (so if I go a day without publishing, it hopefully won't send) or if there's no data. I also wanted to make sure that, in my case, if I post something after midnight but before my mailing list job gets sent, that those entries get included, too (basically, spanning two days instead of one).

Here are the templates I use for my site, and they will be updated if I figure out a better way to do any of this:

* Text Version
* HTML Version

Once you've created those index templates, set them up so they rebuild automatically. Then, in Beatitude, set your mailing to run once a day (if you're using my templates, set it to run at about 2 AM, the morning after your entries are posted), pulling those compiled index templates, set your schedule, and go.

You'll notice on those templates that, other than the entries themselves, there's very little dynamic content (no comment/trackback count, etc…). That way the data won't change, so that trigger won't be a problem.

I've also made it PHP-based so that if there are no entries in the last 24 hours, it should be entirely blank, meaning Dada won't send it. Granted, it may be a while before I have a blank day to test this, but it could happen. (EDITORS NOTE: That still may or may not be working. At this moment, we don't have a solution)

If you'll look at my templates, there's also a couple things you'll see in there. One, to create a dynamic subject line for the e-mails, I've added a bit of text to the template before the template itself renders.

Subject: UtterlyBoring.com Headlines from

What that does is takes the current date, substracts a day (since that's when my entries were written), and prints it up as part of the subject. You need to make sure the "Grab Headers…" boxes are checked.

My HTML template also includes ClickThrough tracking (it makes the URLs too long to include it on the text-version). That's another Dada Magic Book plugin that you will need to setup. It's entirely optional, and is in Beta, so it doesn't work super great, but it works. You'll see in some of the HREFs of that template have "[redirect=" before the URL. That prepends the URL with a tracking URL (going through Dada) so that I can see how many people clicked on certain links in my outgoing e-mails.

I'm always looking for input to make this better, so please feel free to comment here, or e-mail me directly. I have the developer's support on this, so anything that we find that's needed, he's listening.

EDITORS NOTE: This software/installation is not perfect. However, The
developer of this software is REALLY interested in making his software
easier for MT users to use, and wants input from them on how he can make his
product tie in better when it. Your input, suggestions and/or help is greatly appreciated!!

9 Responses to "Using Dada/Mojo Mail to send MovableType Entries Nightly (or how to ditch Bloglet)"

2 | Jennifer

January 14th, 2004 at 1:54 pm

Avatar

You know, I've been thinking about this – (and not because I'm being a cheapskate) but I'm wondering if a simple php script couldn't be written to do this. Hmmm… might be fun for a little side project for me… 😀

3 | Jake Ortman

January 14th, 2004 at 1:56 pm

Avatar

To tie Dada into MT without using Beatitude? Or just to send nightly entries without Dada at all?

4 | Jennifer

January 14th, 2004 at 3:23 pm

Avatar

Using php to send out the nightly emails. I'm sure dada is a good mail program – but if this is all you want to do with it – I have a PHP script floating around in my head that would do the same thing.

One part would actually send the emails – a second part would need to "manage" the email list… (unsubscribes, etc.)

Is there a major component I'm not aware of? (is this script (that's still floating in my head) ;0) simplifying it too much?)

5 | Jake Ortman

January 14th, 2004 at 3:41 pm

Avatar

Well, can the script handles bounces? How about error/usage logging? SMTP sending and batches so you don't piss off your Web host (with confirmations sent to you so you know it was sent)? Can you host a discussion list as well as a announcement list? Is it tied ONLY to MT or can you send a standard email over it? Can it Archive sent messages? Does it have a nice web-based admin? List backup? Prevention from subscribing/unsubscribing other people? Can Customizable headers so you can get past over-zelous spam filters? Can you blacklist people? Can you easily customize the un-sub, sub, etc… e-mails and templates?

Granted, you don't need all that stuff for a simple MT notification list, but it's nice to know it's there if I do, and that's my primary reason for this. I'm sure you could do something simplier that would probably work, but with stats lately that show how many problems there are with legitimate email getting filtered as spam, I'd want something that does it all right, especially as I get more and more subscribers.

Just my two cents :)

6 | Jennifer

January 14th, 2004 at 4:27 pm

Avatar

Well, as you said – you had already been using Dada for other purposes. My script certainly wouldn't take the place of that. I'm just thinking that if someone ONLY wanted to replace bloglet – a "simple enough" script could be written.

With bloglet I can't control who subscribes, unsubscribes, if they actually get it or not, or if it gets sent to their spam box, etc. and that's fine (they can just add the "from" address for the emails to their "allowed" list). My biggest problem with bloglet is that it doesn't seem to be working! I don't always get my bloglet updates – for reasons I'm not aware of – because it resides somewhere else. (I'm a control freak and like to run any scripts I rely on, on MY server. Probably my biggest reason for not getting on the "blogrolling" bandwagon – as much as I think that's a cool program)

In any case, my script would send out the emails, allow people to subscribe/unsubscribe (unsubscribes can be "permanently set" so that you can't be RE-subscribed too easily (ie. malicously) – kind of serving as a "blacklist"). I don't think it would be too difficult to make either of those steps require a "confirmation" (ie. you subscribe – but before you start getting an email every day – you get ONE email you need to confirm you received by clicking a link. If you don't confirm you received the email after a few days – your email is removed from the database. List backup – can be done backing up your database… Customizing subscribe page, emails, admin interface, etc. – yeah, I think so.

The other features like hosting a discussion, archiving sent emails, etc. – that's WAY more than bloglet does. So, THIS script wouldn't be replacing THAT – but it would be good enough to replace BLOGLET. (Don't know if that makes sense) Who knows who would even use it, anyway – but it would be fun to write. :)

7 | Jake Ortman

January 14th, 2004 at 4:40 pm

Avatar

I understand completely, my one concern comes with headers. Yes, while somebody could put "allow from" in their e-mail program, but that's assuming it actually gets to their email program. Hell, if 40% of normal email doesn't make it anywhere, imagine if it's spam/list-like (http://www.informationweek.com/story/showArticle.jhtml?articleID=17300016).

Just something to think about :-) But obviously a simple thing would be better, I just like to have more control, and the ability to send out a non-MT post to the list (like system maintenance upgrades, problems/list info, etc… .).

8 | Jennifer

January 14th, 2004 at 5:45 pm

Avatar

Hmm… system/admin messages – I think I can do that too :) I also think there's some things I CAN modify in the headers using php -I'll have to look into WHAT specifically will make it look "less like spam"… Good suggestions! :)

9 | Hyperliens à louer

February 24th, 2004 at 1:51 pm

Avatar

Billets MT par courriel
Scripts: Using Dada/Mojo Mail to send MovableType Entries Nightly (or how to ditch Bloglet)…

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements