Welcome to Squishdot Websites Squishdot How-To
 about
 search
 post article
 Documentation
 Mailing Lists
 Bug Tracking
 Development
 Installation
 Upgrading
 Download
 admin
 rdf

 main


Making e-mail notification work as expected...
Posted by on Sunday June 04, 04:16PM, 2000
from the cross-eyed-after-mime-encoding-too-long dept.

After installing Squishdot on my own site, and playing around with it for a little bit, I was surprised to discover that the e-mail my site sent to me showed what seemed to be an empty message.

After some careful investigation, reading the MIME encoding specs from the original RFC, looking at the source of some junk e-mail sent to me a couple of days ago, and experimenting quite a bit on my own site, I think I may have figured out a nice way to have Squishdot send the right form of e-mail.

You'll probably want to reformat the text in here to have the sort of format you'd rather it carry.

Note that the original e-mail notification text that you get if you elect to have Squishdot create a shell of a site for you will do a number of things that might be deemed questionable.

Firstly, after the MIME-Version line, there's a line for 'Content-Type' that's set to 'multipart/mixed'. However, it's much more appropriate to set this to 'multipart/alternative', as you're really trying to provide two different ways to present the same text (allowing the e-mail client to select the best one, which in our case is HTML).

Next, right after the 'Content-Type' line, there probably should be a 'Content-Disposition' line that will inform the savvy e-mail client that you intend for the e-mail to be viewed inline, as opposed to forcing the user to view it in source or something. So, my first three lines are written:

MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="someRandomBoundary"
Content-Disposition: inline;

Note the 'boundary' part of the Content-Type. Put in quotes, you can use almost anything you like. But when you go to separate the portions of the e-mail out, you need to prepend it with '--', and at the end of the e-mail, you must also append it with a '--'.

The next few lines are pretty much normal:

From:
To:
Subject: Reply Notification
X-Priority: 3 (Normal)

You could put other things in there.. this is basically the header of the e-mail. Eventually, you'll get to the first part of the multi-part e-mail...

--someRandomBoundary
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
Reply Notification

A new reply has been posted to the message "" which you recently posted to "<dtml-var title>".

The new reply may be found at /

The message contents are as follows:

Subject:
From: <>
Date:






To stop receiving reply notifications for this message, go to /cancelNotify

This is the plain, boring, ugly old text that any user's MIME compliant e-mail had best be ableto handle. But, for some extra spiff, you may also want to include a second part to this:

--someRandomBoundary
Content-Type: text/html; charset="us-ascii"
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;



Reply Notification


A new reply has been posted to the message
which you recently posted to .


The message contents are as follows:


Subject:

From:

Date:



<dtml-var sequence-item>





Click here to stop receiving reply notifications for this message.


Then, you have to close out the multi-part e-mail with the following:

--someRandomBoundary--

And that should do it. I've included a text file in this note to help things out. I'd strongly recommend getting the text file and modifying it to suit your own needs, rather than trying to clip this document, since this document may contain errors (I hand-typed it).

<  |  >

 

Related Links

File Attachment
  • Click to download attachment squishmail.txt
    1KB (2031 bytes)

The Fine Print: The following comments are owned by whoever posted them.
( Reply )

Re: Making e-mail notification work as expected...
by on Saturday July 29, 07:22PM, 2000
This is fixed differently (better?) in Squishdot 0.4.1.


Thanks for the bugpost though :-)

[ Reply to this ]
The Fine Print: The following comments are owned by whoever posted them.
( Reply )

Powered by Zope  Squishdot Powered
  "Any system that depends on reliability is unreliable." -- Nogg's Postulate
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©1999 , ©2000-2002 .