Re: [NEWBIE] How to send an email with Cocoa?
Re: [NEWBIE] How to send an email with Cocoa?
- Subject: Re: [NEWBIE] How to send an email with Cocoa?
- From: stephane sudre <email@hidden>
- Date: Wed, 27 Oct 2004 11:53:56 +0200
On Oct 27, 2004, at 11:36 AM, John Andersson wrote:
Check out the "EmbededAppleScripts" example at Apple's samplecode
page. It's in carbon, but maybe there's some example for Cocoa as
well, or it could just hint you how to solve it.
http://developer.apple.com/samplecode/AppleScript/index.html
(It's under "Carbon" on that page)
/John
2004-10-27 kl. 08.10 skrev Igor Couto:
Dear List Members,
Sorry for the newbie question... Before anyone tells me to RTFM: I
have already wasted several hours scouring the Cocoa docs, and cannot
find any hints on how to do this. I need to be able to send an email
from inside my Cocoa application. Rather than having to deal with
network communications directly - and reinvent the wheel - I thought
it might be easier to simply create a new email message, and allow
the user to send it using their default email client. This is a
relatively simple task - which can even be accomplished with
AppleScript. I cannot, however, find a way to do this using Cocoa.
I thought then that perhaps the quickest way to accomplish the task
would be, indeed, to write a little AppleScript to do the trick, and
then embedding it inside my Cocoa classes - using it like a 'function
library'. But I could not find any documentation explaining how to do
this, either - I guess most programmers would be trying to do the
opposite (ie., embed Objective-C/Cocoa code into AppleScript
applications, not the other way around)...
So, my questions are:
1) Is there a way, from inside Cocoa, to create a new email message?
Is there a way to get the user's default email client to handle the
sending of the message?
Message.framework
?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden