« Convert MT4 Entries to Pages | Main | Add User Photos (Avatars) using User Profiles »

Customize MT4 Notification Emails

The Customized Email Templates plugin enables MT4 sites to customize email notification templates on per blog basis. Using the familiar MT4 template management screens, you can easily customize the emails that get sent out by the system. For example, you could change the order of comment fields, remove unwanted items, or add new pieces of information to suit your needs.

How it Works

When MT is ready to send an email, the plugin looks for template modules in that blog with the same names as the default system filename. The key names are:

  • new-comment.tmpl
  • new-ping.tmpl

If the module is not found, the system default will be used (same as without the plugin). If a match is found, the template module will be used instead of the system default.

Note that these template modules are special, because they are a hybrid of an "application template" and a "blog template". What this means is that you will see a lot of <mt:var tags, which are variables that are set by the system. In addition to these tags, you can also use normal <MTCommentXXX, <MTCommenter and <MTEntryXXX tags when customizing these templates.

Template Sets

As a separate download, I have created a template set to get you started: This template set includes template modules for both comment notifications (new-comment.tmpl) and trackback notifications (new-ping.tmpl). Remember, it is important not to rename these modules.

These templates are virtually identical to the system defaults, but I have included two enhancements to the new-comment.tmpl template:

  • If the comment was made by a authenticated commenter, the Auth type will be shown after their name. For example, it would show "Commenter name: Bob Sakamano (Vox)".
  • I have modified the "View comment" URL so that it includes the anchor #comment-<mt:CommentID>. These means that when you click the link, it will go directly to that comment on the page, rather than to the very top of the page. This is handy for sites that get a lot of comments, and you have scroll all the way down to view the new comment and/or reply.

Requirements

Installation

Download and extract the zip file. Upload the contents of the 'plugins' folder to the 'plugins' directory of your Movable Type installation.
For each blog that you want to customize, install template Modules to be used. Download the template sets and install them using Template Installer. (Advanced users can create these manually, but they must be named as described above.)

Get Customized Email Templates

Commercial License - $97.00

Personal License - Free

Customized Email Templates is free for personal, non-commercial use.

Download Now

Download Now
Downloads: 157

Template Set:
Download Now

As always, comments and suggestions are welcome.

Rate this entry:

  • Currently 4.7/5
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 4.7/5 (3 votes cast). Powered by the Ajax Rating plugin.

Comments (9)

Ben:

Great plugin -- thanks! One question: is there a way to use this to customize new-entry alerts, or does it just work for new comments and trackbacks?

Ben, what do you mean by "new-entry alerts"? MT doesn't send out emails when a new entry is posted.

Perhaps you are referring to "entry notifications", that can be sent to people who sign-up for notifications on new entries. If so, yes, you can customize those emails with this plugin. Simply create a template module called 'notify-entry.tmpl' and the plugin will use that instead of the system default. You should start with the default template code in the /path/to/mt/tmpl/email/notify-entry.tmpl file and then customize from there. I haven't tested this yet, but it should work.

Stuart:

Mark, how do you go about setting up entry notifications? I'm not needing anything specialized, but I'm having trouble finding where where it is "that (e-mail) can be sent to people who sign-up for notifications on new entries."

Thanks,

Stuart

nevado Author Profile Page:

How i can change the subject of the emails?

Nevado,

Wit this plugin you cannot change the subject of the emails, only the body of the emails....

Hi Mark,

Two things:

  • The path to the notify-entry template given above (/path/to/mt/tmpl/email/notify-entry.tmpl) does not take me to the "notify-entry.tmpl". I'm using MT4.1. Can you think of anywhere else that it might be hiding?

  • Currently, when I send out a notification, or use the comments function of MT, I get this error:
    Can't call method "param" on an undefined value at /path/to/mt/plugins/CustomizedEmailTemplates/CustomizedEmailTemplates.pl line 56.
  • I've commented out lines 56 through 66 which suppresses the error, but I'm still not seeing the notification working in that it doesn't send out to the address book, only the manually added addresses.

    TIA!
    -al.

    Scott Author Profile Page:

    We're interested in using this on a client's site but although in our initial testing Movable Type is able to send the comment notification email, the body of the message is completely blank. We're not sure if this is a compatibility problem with 4.2.x or something else.

    Any chance there might be an update in the near future that might correct this?

    carol Author Profile Page:

    we recently changed hardware and upgraded from 3.3 to 4.1 in the process. on 3.3 our bloggers were able to receive emails when one in their group updated/posted a new entry to the blog. This does not happen with 4.1 - would this be the tool to use to enable that feature again? the shared bloggers really want to see what their group peers are saying on the blogs instead of having to check periodically.

    Post a comment