Keep It Simple, Stupid | |
PerlMonks |
Embedding images into HTML-emails as attachmentsby LanX (Saint) |
on Mar 04, 2016 at 12:38 UTC ( [id://1156803]=perlquestion: print w/replies, xml ) | Need Help?? |
LanX has asked for the wisdom of the Perl Monks concerning the following question:
Brethren! For my current project I'm supposed to send HTML emails (sigh) with pictures (double-sigh) within a large company with a self made mailing module (triple-sigh) Uploading the images to a webserver is no option since some of the recipients are outside the intranet. At the moment we are using an self made mail module and producing multi-part emails where the images are inlined attachments referenced either by content-location or content-id . see http://www.faqs.org/rfcs/rfc2557.html Is there a generic module to do facilitate this? I'd like to have a HTML template with placeholders for images which are automatically mapped to attachments to simplify the generation of those emails: Something like <img src="{{ATTACH:path}}"> expanded to <img src='cid:3__=398519209581029819@sender@foo.org"> and the attachment with Content-Disposition: inline; and correct CID automatically appended to the mail.
Actually I already re-inveted the wheel , but would be thankful to know about saner alternatives.
Cheers Rolf
UPDATESTypo: s/attachement/attachment/ #thanks chacham
Back to
Seekers of Perl Wisdom
|
|