• 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
Re: Embedding Image Data in a Component Email
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Embedding Image Data in a Component Email


  • Subject: Re: Embedding Image Data in a Component Email
  • From: Adam Ramadan <email@hidden>
  • Date: Thu, 17 Jun 2004 11:29:36 -0400

Hi Greg,

Here is a tutorial on using JavaMail that you may find useful:
http://java.sun.com/developer/onlineTraining/JavaMail/contents.html

The section "Working with Attachments" demonstrates how to attach a file to an email.

If you want an html type message, with images within the message, then you have additional work to do, but if you just want to send the image as an attachment it is fairly straightforward.

You will probably need to create a DataSource implementation that wraps your NSData (the example they have in the tutorial uses a File), but that is trivial; there are four simple methods to implement to specify the content (mime) type, which you should know since you're generating the images, the name of the file, the input stream (NSData.stream()) and the output stream (just throw an IOException).

Hope that helps,
Adam


Chuck Hill wrote:

I did not mean that it would solve it for you. You are going to have to encode the image data into a MIME attachment to the e-mail. Not a task for the faint of heart. The JavaMail API is a tad gory. I've never done this, but based on reading the docs some time back I figure you are in for a day or two of research and work unless you can find a higher level framework that sits on top of JavaMail.

Chuck


On Jun 16, 2004, at 4:13 PM, Greg Hulands wrote:

Thanks for your reply Chuck, I have just installed Wonder but it to just embeds the image link. Could you give a quick overview of how to create the multipart mime message, as documentation on it seems quite sparse.

Thanks,
Greg

On 17/06/2004, at 1:43 AM, Chuck Hill wrote:

You can do this in a multi-part MIME message. It does take a bit more effort than what you are doing. JavaMail provides support for multi-part MIME messages and there is a WO wrapper framework in Project WONDER.

Chuck


On Jun 15, 2004, at 9:42 PM, Greg Hulands wrote:

Hi,
I am generating an email that contains a dynamically generated image in it. I have a method in the component that returns the NSData for the image, but when it sends the email, it only has a link to the image, and not the image data itself. Because the link to the component will no doubt be invalid by the time the recipient wants to view the image means that the current way is no good. Is there some way for the component to embed the image data some how?


Any help is greatly appreciated.

Thanks,
Greg
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Embedding Image Data in a Component Email (From: Chuck Hill <email@hidden>)
 >Re: Embedding Image Data in a Component Email (From: Chuck Hill <email@hidden>)

  • Prev by Date: How Big can WO apps get?
  • Next by Date: Fwd: How to mount a windows folder programmatically?
  • Previous by thread: Re: Embedding Image Data in a Component Email
  • Next by thread: Re: Embedding Image Data in a Component Email
  • Index(es):
    • Date
    • Thread