Send email from app with attachment (Carbon)

konan

Registered
Using the carbon API (or a command line system call), what is the easiest way for my application to bring up the default email client and create an email with an address, subject, body and a file attachment assigned to it? The user would then press the "send" button to complete the transaction.

The soultion should be universal, i.e. work with just about any email client.

My program needs a "send file to friend" option. The file attachment is critical.

Any advice you can provide would be greatly appreciated,
Konan
 
I don't know of any universal way to send an email with an attachment. I don't think there is a general protocol that supports that, only the
Code:
mailto:blah@where.com?subject=Re: mess&body=this+is+a+message

You'll need to use AppleScript and have the user select his client from a list. Shouldn't be too hard to write a simple AppleScript for Mail, Entourage, etc.
 
Back
Top