Coercing Squeak to send HTML emails
Nevin Pratt
nevin at bountifulbaby.com
Sat Sep 3 18:15:33 UTC 2005
Nevin Pratt wrote:
> What is the secret to coercing Squeak to send HTML emails instead of
> plain text emails?
>
> Right now I am using the AdHocComposition class for sending out
> emails, but I'd like to send out an HTML email instead of a plain text
> email.
>
> Incidentally, the HTML email I want to send will be a printable Gift
> Certificate that the recipient can print out and use. Since it is a
> gift certificate, it needs to be fancy-- something more than just
> plain text.
>
> Nevin
>
>
To answer my own post, just set Content-Type: html. For a
quick-and-dirty example,
| str |
str _ ReadWriteStream with: String new.
str nextPutAll: 'Date: ' , MailMessage dateStampNow , '
From: nevin at bountifulbaby.com
Subject: HTML test
To: squeak-dev at lists.squeakfoundation.org
Content-Type: text/html
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body>
<h3>This is a test to see how this works.</h3><br>
</body>
</html>'.
(AdHocComposition celeste: 'mail.earthlink.net' initialText: str
contents) submit
Nevin
More information about the Squeak-dev
mailing list
|