tags:

views:

707

answers:

4
+1  Q: 

Send Email - Cocoa

Hey,

How would I be able to send emails using Cocoa? Which framework would I use, and how would I use it. This is very new to me so please go easy.

Best Regards,

Kevin

A: 

You can use opening the default mail client or you can use a framework. This should get you started.

Garrett
Both of them don't work for me. Can anyone give me an example? I'm sorry but I am very new to this?
Kevin
Are you developing for the iPhone or Desktop?
Garrett
I'm developing on Desktop with Xcode 3.2
Kevin
You can't develop anywhere other than the desktop, if you're developing for the desktop those 2 links are well efficient if you try them out.
Garrett
Also note, they both include code you can copy and paste, and run to get what you want, they will work.
Garrett
A: 

For Growl 1.2, I wrote a Python-based mail-sending program, which the MailMe display runs using NSTask.

I did this largely out of dissatisfaction with the other mail frameworks for Cocoa, most of which also support receiving mail, which is unnecessary for something output-only like MailMe.

Peter Hosey
A: 

Check out:

http://www.collaboration-world.com/pantomime

I haven't looked at it in several years, but when I was at Apple I advocated that we include it with the OS to replace the mail functionality we'd lost in the NeXT/Apple transition.

NSResponder
+1  A: 

Apple's Developer Connection has a sample project called SBSendEmail which demonstrates how to use a Scripting Bridge to send email via scripting to the Mail app.

You can download the whole project and run it in XCode to see how it works. Of particular interest to you will be the sendEmailMessage: method in Controller.m

Brandon Bodnár