• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
including an image in a mail component
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

including an image in a mail component


  • Subject: including an image in a mail component
  • From: Johan Henselmans <email@hidden>
  • Date: Tue, 7 Jul 2009 10:09:11 +0200

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: including an image in a mail component
      • From: Andrew Lindesay <email@hidden>
  • Prev by Date: Re: changing appereance of the AjaxModalContainer
  • Next by Date: Re: including an image in a mail component
  • Previous by thread: MapQuest integration
  • Next by thread: Re: including an image in a mail component
  • Index(es):
    • Date
    • Thread