This is my solution, maybe this is not the best:
create the DTML mime_file method in portal_skin / custom:
<dtml-mime type="text/text; charset=utf-8" encode="7bit"> <dtml-var "text"> <dtml-boundary type="application/octet-stream" disposition="attachment" filename_expr="nomefile"><dtml-var "file"></dtml-mime>
Call it (e.g. with Python Script) as:
message = context.mime_file(file=a_file, text=message, nomefile='attach_name.pdf') context.MailHost.send(message, mTo, mFrom, mSubj)
where a_file is the contents of the file.
inspired by:
http://www.zope.org/Members/visibleoffice/HowTo.2003-10-22.1455
This is a quick and convenient solution using Python scripts.
source share