• 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: Sending HTML mail message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending HTML mail message


  • Subject: Re: Sending HTML mail message
  • From: David Masters <email@hidden>
  • Date: Tue, 21 Jan 2003 11:29:34 +0000

On Monday, January 20, 2003, at 10:01 PM, Steven M.Palm wrote:

I am trying to come up with a simple program for someone to send an HTML formatted e-mail.

I realize all of the arguments against doing this, so please save your breath and energy, and don't respond if all you're going to say is "Don't do it." This is a regular mailing to a group of people who have specifically expressed an interest in having it in that format.

This is probably not the answer you're looking for, but at least I'm not going to say "Don't do it"...

We had to do this for a client of ours, and the solution that we found the quickest to implement was to put together a simple WebObjects application that used JavaMail to send multipart MIME messages (both text and HTML alternate parts) to email addresses stored within a database.

It then becomes trivial: create a mime message; add in the from, to, and subject headers; and then add in the alternate parts - HTML and plain text - and send. The entire message sending code is less than twenty lines of code, and we get the ability to send out multipart emails rather than just HTML-formatted emails.

The WebObjects approach works perfectly for our purposes as we need to talk to the database anyway, but I imagine it would be equally straightforward to re-write the message sending part as a Cocoa/Java application, if you don't mind using Java.

Obviously, if you want a Cocoa/Obj-C solution (and I do too - we use Java for all our WebObjects development, but Obj-C for our Cocoa development) then this isn't going to help! I'd be interested in any techniques for doing this in Obj-C using the bundled frameworks, but at least this approach kept our client happy.

If anyone wants the source to the WO application, let me know.

David


David Masters, Software Imagineer
email@hidden

Web: http://www.pyrusmalus.com Tel: +44 141 427 9649 Fax: +44 141 427 1740

P y r u s M a l u s | d e s i g n | d e v e l o p | d e l i v e r | c o n s u l t | t r a i n | s u p p o r t |
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Sending HTML mail message (From: "Steven M.Palm" <email@hidden>)

  • Prev by Date: Leaking Memory
  • Next by Date: Re: Horizontally centering NSButton in NSTableColumn
  • Previous by thread: Sending HTML mail message
  • Next by thread: personal convience constructors
  • Index(es):
    • Date
    • Thread