[opencms-dev] OAMP Newsletter: Existing attachement extension?

Mario Jäger m.jaeger at alkacon.com
Tue Dec 29 15:14:42 CET 2009


Hi Christian,

I think it should be possible to use the attachment methods of the classes of the 
org.apache.commons.mail package. An example to convert a CmsResource into an email 
attachment you find in org.opencms.newsletter.CmsNewsletter.getEmail():

htmlMail.attach(new CmsVfsDataSource(cms, resource), resource.getName(), description);

-- 
Kind Regards,
Mario.
 
-------------------
Mario Jäger
 
Alkacon Software GmbH  - The OpenCms Experts                    
http://www.alkacon.com - http://www.opencms.org


Christian Hellinger schrieb:
> Hello together,
>
> I am wondering, if someone already build an extension of the OAMP 
> Newsletter module for adding file attachments to a newsletter?
>
> If yes, is this module available?
>
> If this extension doesn't exist or can't be amde available for some 
> reasons:
> I understand, that I have to create a class implementing the interface 
> I_CmsNewsletterMailData  and also extend the given schema with a field for 
> selecting the file which should be sent as attachement. 
> I am asking myself if there is already a method to then attach the file. 
> In the implementation of CmsNewsletterMailData the classes CmsHTMLMail and 
> CmsSimpleMail are used, which extends the classes of the 
> org.apache.commons.mail package. So it should be possible to use the 
> attach methods of these classes, after doing some "converting magic" to 
> get the CmsRessource as EmailAttachment. Or I am missing something?
>
> I also found the classes org.opencms.newsletter.CmsNewsletter which 
> implements an addAttachment method. this class is from an old newsletter 
> implementation?
>
>
> Best regards
>
> Christian Hellinger
>
> --------------------------------------
>
> DREGER INFORMATION TECHNOLOGY
>
> J&J DREGER Consulting GmbH & Co. KG
> Carl-Benz-Str. 35
> 60386 Frankfurt am Main
> Germany
>
> Phone :    +49-69-90479-0
> Fax   :    +49-69-90479-479
>
> Mobile:    +49-173-6688208
>
> Email :    christian.hellinger at dreger.de
> WWW   :    http://www.dreger.de
>
> --------------------------------------
> Consulting & Solutions: http://www.d-business.de
> Mobile Solutions Competence Center: http://www.d-business.de/mscc
> --------------------------------------
> DREGER IT ist Mitglied der Grouplink
> WWW : http://www.grouplink.de
> --------------------------------------
> Sitz / Registergericht: Frankfurt am Main / Amtsgericht Frankfurt am Main
> Registernummer: HRA 42705
> Geschaeftsfuehrer: Jens Dreger
> USt.ID: DE244892265
> --------------------------------------
> Komplementaer-GmbH: J&J DREGER Verwaltungs GmbH, Carl-Benz-Str. 35, 60386 Frankfurt am Main
> Sitz / Registergericht: Frankfurt am Main / Amtsgericht Frankfurt am Main
> Registernummer: HRB 73891
> Geschaeftsfuehrer: Jens Dreger
> --------------------------------------
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>   



More information about the opencms-dev mailing list