Re: Send Email with "deliverMessage"
Re: Send Email with "deliverMessage"
- Subject: Re: Send Email with "deliverMessage"
- From: Mark Munz <email@hidden>
- Date: Sat, 10 Apr 2004 02:56:41 -0600
On Apr 9, 2004, at 9:55 AM, Julien Dufour wrote:
On Apr 7, 2004, at 14:41, Lorenzo wrote:
Hi,
with my and some other computers my application can send emails with
the API
--
[NSMailDelivery deliverMessage:...
--
but some other people cannot. They can quite send emails through
"Apple
Mail" application. They well defined an account there, the password,
the
SMTP... so they can send emails with "Apple Mail" application.
They have no firewall on outgoing messages.
What else should I check and fix?
Hello
The NSMailDelivery API is currently rather unreliable when used in a
product targeting a large public. In fact, it can be laborious to get
working the first time, but once a user has succeeded sending one
message, it works fine.
The secret shelter of the beast:
According to my investigations, the issues are related to the way it
retrieves the mail settings (outgoing mail server (SMTP) and e-mail
address of the sender). This information is dug from both Mail.app
preferences and Internet Config settings. Mail.app is always having
priority, so IC is consulted only when Mail.app has never been
configured.
In Mail.app, the first e-mail address in the list of the first e-mail
account is retrieved (I haven't checked wether disabled accounts are
ignored or not, I guess not). The retrieved SMTP server is the first
one of the list of SMTP servers, *regardless* of the ones set in the
e-mail accounts!
Internet Config works simpler, there is only one entry for each
setting (kICSMTPHost and kICEmail). Although the Internet preference
pane has gone under Panther, the IC settings are still taken into
account when they are available. The users which have upgraded from
Jaguar and preserved their account may have some values set up in
their preferences.
I would suggest logging a bug against the NSMailDelivery API.
The issue may be solved by Apple writing some sample code that shows
the "proper" way to use the NSMailDelivery API to take into account the
issues you mentioned above, or it may mean that Apple needs to fix the
API. It won't magically happen, so I suggest that anyone needing this
functionality log a bug against it <
http://bugreport.apple.com> so that
it hits Apple's Radar, especially if a lot of people are looking for
this kind of functionality and log it with Apple.
I personally would like to see some POP3/SMTP API for Cocoa that's as
simple as the one's provided with RealBASIC.
Mark Munz
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.