> On Jul 7, 2016, at 9:13 AM, Carl Hoefs <newsli...@autonomy.caltech.edu> wrote:
> 
> I have a daemon app built on Foundation (aka "command line tool") running in 
> the background and I need it to issue a textual email on certain conditions. 

Do you mean daemon or agent? A daemon runs outside of any user login session 
and is usually started at boot time. An agent has no UI but is part of the 
login session. This is significant, because an agent process can communicate 
with GUI apps using AppleEvents or XPC.

There isn’t any easy way of doing this that I know of, if you can’t tell 
Mail.app to do it. There are built-in Postfix mail tools, but they’re not 
configured for relaying mail to a server. You’d have to talk to the SMTP server 
yourself, but that involves reading the user prefs to get the server 
configuration, and likely finding credentials to log in with… (There might be a 
3rd party library for doing this, though.)

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to