Sending mail from an application launched as a startup item
Sending mail from an application launched as a startup item
- Subject: Sending mail from an application launched as a startup item
- From: "Peter Sichel" <email@hidden>
- Date: Tue, 2 Oct 2007 16:34:14 -0400
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.
It would appear that copying the users Mail.app preferences from:
~/Library/Preferences/com.apple.mail.plist
To:
/Library/Preferences/com.apple.mail.plist
Allows the message framework to send Email from a startup item, but this
seems like a clumsy work around. Is there an easier way to send Email
notifications from a modern NSFoundation based tool that runs as a
startup item?
Since not everyone uses Mail.app, my application provides an
InternetConfig panel to establish basic Email settings, but this would
appear to have the same conflict between:
~/Library/Preferences/com.apple.internetconfig.plist
and
/Library/Preferences/com.apple.internetconfig.plist
Are there any guidelines for configuring /Library/Preferences/
com.apple.internetconfig.plist? If I copy the former to the later, can
I expect this to work?
Thanks!
- Peter
_______________________________________________
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