i would like to send an image with a mail component.

I am wondering how I should do that.

I first tried to create a image and then to include this as a WOImage in a HTML component, but that will give me a src pointer to the file with a URL or filename. (it also included FRAMEWORK_NOT_FOUND in the path)

Then I created an attachment via:


=============
        File file = new File(mySess().orderBarcodeFileName());
ERMailAttachment barcode = new ERMailFileAttachment("barcode.jpg",mySess().orderEntranceCode(), file);

        mail.newMail();
        mail.setFromAddress(EmailFrom);
        mail.setToAddresses(mailTos);
mail.setSubject("Confirmation from "+mySess().currentProgramSetting().settingsOrganisationName());
        mail.addInlineAttachment(barcode);
        mail.sendMail();
=============

but that creates (in Mail.app) an image that one can only see via quicklook, or Preview.

replacing
=============
mail.addInlineAttachment(barcode)
=============

with
=============
mail.addAttachment(barcode);
=============

does show the image direct in the message, so one can print the image direct in the mail message (which is the purpose as it is supposed to be an electronic ticket)

I would like to add some comments to the message, and that would mean (I suppose) to add another attachment to the message with the comments.

It would be a lot easier if I could just create a WOComponent that would have the image, the extra comments etc.

Does anybody know if and how I could accomplish that?

Regards,

Johan Henselmans
http://www.netsense.nl
Tel: +31-20-6267538
Fax: +31-20-6279159



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to