The mime
tag allows you to create MIME encoded data. It is chiefly
used to format email inside the sendmail
tag.
mime
tag syntax:
<dtml-mime> [<dtml-boundry>] ... </dtml-mime>
The mime
tag is a block tag. The block is can be divided by one
or more boundry
tags to create a multi-part MIME message. mime
tags may be nested. The mime
tag is most often used inside the
sendmail
tag.
Both the mime
and boundry
tags
have the same attributes.
base64
. Valid encoding options include base64
,
quoted-printable
, uuencode
, x-uuencode
, uue
, x-uue
,
and 7bit
. If the encode
attribute is set to 7bit
no
encoding is done on the block and the data is assumed to be in a
valid MIME format.type
and type_expr
.name
and name_expr
.disposition
and
disposition_expr
.filename
and
filename_expr
.Sending a file attachment:
<dtml-sendmail> To: <dtml-recipient> Subject: Resume <dtml-mime type="text/plain" encode="7bit"> Hi, please take a look at my resume. <dtml-boundary type="application/octet-stream" disposition="attachment" encode="base64" filename_expr="resume_file.getId()"><dtml-var expr="resume_file.read()"></dtml-mime> </dtml-sendmail>