Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
Operating System: other
Platform: Other
-
39391
Description
Hi!
I've written a new "embed" method (simply but neccesary) for the HtmlEmail
class:
public String embed(DataSource ds, String name) throws EmailException{
// verify that the DataSource is valid
try
{
if (ds == null || ds.getInputStream() == null)
}
catch (IOException e)
MimeBodyPart mbp = new MimeBodyPart();
try
{ mbp.setDataHandler(new DataHandler(ds)); mbp.setFileName(name); mbp.setDisposition("inline"); String cid = randomAlphabetic(HtmlEmail.CID_LENGTH).toLowerCase(); mbp.addHeader("Content-ID", "<" + cid + ">"); this.inlineImages.add(mbp); return cid; }catch (MessagingException me)
{ throw new EmailException(me); }}
Attachments
Issue Links
- duplicates
-
EMAIL-35 [email] Embedding raw DataSource Attachments
- Closed