[NEWBIE] How to send an email with Cocoa?
[NEWBIE] How to send an email with Cocoa?
- Subject: [NEWBIE] How to send an email with Cocoa?
- From: Igor Couto <email@hidden>
- Date: Wed, 27 Oct 2004 17:10:33 +1000
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?
2) Does anyone know of a way to embed an AppleScript into your Cocoa
app, and use it - as you'd use a library?
Any hints or suggestions on alternative ways to accomplish this would
be greatly appreciated.
Many thanks in advance,
--
Igor Couto
Sydney, Australia
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden