• 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: [NEWBIE] How to send an email with Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NEWBIE] How to send an email with Cocoa?


  • Subject: Re: [NEWBIE] How to send an email with Cocoa?
  • From: Igor Couto <email@hidden>
  • Date: Thu, 28 Oct 2004 11:28:36 +1000

On 28/10/2004, at 11:17 AM, M. Uli Kusterer wrote:

At 15:32 Uhr +0200 27.10.2004, Alexander F. Hartner wrote:
How would this address the need to specify the outgoing mail server. I
think this would at best be the same as using the Framework suggested
earlier in this thread.

I guess I misunderstood. As I read it, the whole point of the exercise was just to send an e-mail to a particular address. In that case, creating an NSURL of the form I specified and opening it (I think NSWorkspace has a method for that?) would automatically launch the user's mail application and create a new message with the specified info. Depending on the mail client, they'd still have to click "send", though.


To all list members who replied to this thread:

Many Thanks for all your suggestions!

My original posting stated the following:

I am writing a software registration module. The module will collect registration info from the user, encrypt it, and then produce a file with the encrypted information. I would like to be able to email the file (to a default registration email box) from inside my Cocoa app.

Rather than having to deal with network protocols, worrying about connection states, firewalls, etc., I thought it would be easier to simply try to get the user's default email client to send the message for me. I do not mind whether the user has to click the 'send' button inside their email client or not.

I know - from responses received earlier - that I can use NSWorkspace's "-openURL:" method, passing it a URL with an extended mailto scheme - which may include subject and body. I've tried that, and it works. The only problem that remains, though, is: HOW DO I ATTACH THE REGISTRATION FILE TO THE MESSAGE?

Some have suggested that I use the 'Message' framework. But as far as I understand - and please, do correct me if I'm wrong - that framework can present 2 problems. First, it seems to rely on the user having configured their Mail app. Unless the user has entered their mailing information correctly - for Mail - during system setup, the framework will not function correctly. Secondly, it does not use the user's default email client, but rather, tries to send the message directly - which may cause problems where users are inside tightly firewalled networks. That was my reasoning for wanting to use the user's default emailer in the first place.

So, any hints or suggestions on how to get this to work would be IMMENSELY appreciated! :-)

Now, one little 'slap on the wrist':

I would like to point out that my original message was NOT SENT TO THIS MAILING LIST. Until 5 minutes ago, I was not even a member of this list. My original message was posted to another mailing list hosted at apple: 'email@hidden'.

It seems that one of you participates on both lists, and does not bother to check which list the emails are coming from. You sent your reply to the wrong list, which prompted an entire thread to be created here. While the responses you received were great, they would have been of no use to me - the original poster - because I did not even know they existed. I found out these replies *by accident*, while doing a search on "http://www.cocoabuilder.com";.

Please, do not be lazy with your email. You can quickly setup a RULE/FILTER in your email client, which will automatically archive messages from different lists in different folders. And, above all: make sure that when you address your message, you are sending it to the *right* list!

Cheers,
--
Igor Couto
Sydney, Australia

_______________________________________________
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
References: 
 >Re: [NEWBIE] How to send an email with Cocoa? (From: "M. Uli Kusterer" <email@hidden>)
 >Re: [NEWBIE] How to send an email with Cocoa? (From: "Alexander F. Hartner" <email@hidden>)
 >Re: [NEWBIE] How to send an email with Cocoa? (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Re: NSDictionary and binding
  • Next by Date: Re: [ANN] Cocoa Style for ObjC: 1 and 2
  • Previous by thread: Re: [NEWBIE] How to send an email with Cocoa?
  • Next by thread: [NEWBIE] How to send an email with Cocoa?
  • Index(es):
    • Date
    • Thread