about search post article Documentation Mailing Lists Bug Tracking Development Installation Upgrading Download admin rdf |
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:
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:
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...
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 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). < | >
|
|
||||||||
|