Re: Sending mail from an application launched as a startup item
Re: Sending mail from an application launched as a startup item
- Subject: Re: Sending mail from an application launched as a startup item
- From: Dave Camp <email@hidden>
- Date: Tue, 2 Oct 2007 14:32:49 -0700
On Oct 2, 2007, at 1:34 PM, Peter Sichel wrote:
My application uses Message.framework to send Email logs and
notifications. As I recall, sometime around 10.4 Apple changed the
message framework to use the Mail.app Email engine as opposed to
the old
UNIX sendmail. By doing this it was no longer necessary to provide a
preference panel to configure Email settings since the users Mail.app
settings in ~/Library/Preferences/com.apple.mail.plist would be
used directly.
My application also supports an option to run as a Mac OS X startup
item. When running as a startup item, the Message.framework no longer
has access to the users Mail.app preferences so returns an error
that it
is not configured.
Looking at TN2083, are you saying your app runs as a Daemon Startup
Item? It would make sense that your code doesn't work correctly in
that case because there is no user logged in at the time your app is
launched. On a machine with multiple users, whose preferences should
you use? Each user will probably have different mail settings.
Taken to the next step, if a second user on the machine installed
your app and the app was copying ~/Library/Preferences/
com.apple.mail.plist to /Library/Preferences/com.apple.mail.plist,
the first user's install would probably stop working (email settings
would not be valid for them).
Or, possibly, I've misinterpreted how your app runs... :-)
Dave
_______________________________________________
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