I need to construct an SMTP email message on a Unix platform using Tcl. The
message will have an attachment file which is an HTML file and, I assume,
I'd use MIME to attach it. It's not clear to me how to specify the attached
file. Obviously, the HTML file is ASCII. Do I just attach it as an ASCII
file? Do I need to go through the BASE64 conversion for this HTML file?
I can communicate with our mail server using a socket from Tcl, and also
send a regular SMTP message without attachments. So it's just this MIME
stuff that is holding me up.
Any help (suggestions, links to other sites, etc.) you can give me is
greatly appreciated.
Thanks in advance,
Dennis Lilla
See http://x27.deja.com/getdoc.xp?AN=506294008
--
Jeffrey Hobbs The Tcl Guy
jeffrey.hobbs at scriptics.com Scriptics Corp.
Dennis Lilla wrote:
> file. Obviously, the HTML file is ASCII. Do I just attach it as an ASCII
> file? Do I need to go through the BASE64 conversion for this HTML file?
You don't need to use BASE64 unless your HTML has characters outside the
range of 32-126, i.e., if it's not normal ASCII, but instead includes odd
control characters or high-bit characters, or unless you have lines more
than 1000 characters long. Use content-type:text/html in the header, and
leave out the content-transfer-encoding header.
--
Darren New / Senior Software Architect / MessageMedia, Inc.
San Diego, CA, USA (PST). Cryptokeys on demand.
Any sufficiently advanced diety is indistinguishable from an alien.
which are not necessary in HTML anyway. HTML has its own encoding for such
things, &#.
--
<URL:http://www.glinx.com/~hclsmith/>