> On Jul 7, 2016, at 9:33 AM, Jens Alfke <j...@mooseyard.com> wrote: > >> On Jul 7, 2016, at 9:13 AM, Carl Hoefs <newsli...@autonomy.caltech.edu >> <mailto: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.
It's a daemon, started at boot time and runs outside of a user login. Even so, it wouldn't be appropriate to communicate with a GUI app, which still requires user intervention, if only to press the Send button. > > 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.) It seems a bit odd to me that I can connect all sorts of little network devices (webcams, network monitors, remote power switches, etc) to a LAN and they can all be set to issue email. I didn't really want to go 3rd party, as there is a yearly cost to the only package I could find (which is just a dylib, not source). -Carl _______________________________________________ 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