Re: Emailing from a daemon process

2016-08-03 Thread Jens Alfke
> On Jul 7, 2016, at 6:56 PM, Bruce Stephens wrote: > > Could use a simple Perl script… quick easy and nasty… We already spent many messages dissecting why simply invoking sendmail doesn’t work. > Works!!! It might work on your machine, because you’ve configured Postfix to route mail proper

Re: Emailing from a daemon process

2016-08-03 Thread Bruce Stephens
Could use a simple Perl script… quick easy and nasty… #!/usr/bin/perl # … # from an old online sales system that is still operational ... { open(MAIL2,"|/usr/sbin/sendmail -t -f nobody") || &mydie("Hmmm, a nasty horrible server error

Re: Emailing from a daemon process

2016-07-08 Thread Jens Alfke
> On Jul 8, 2016, at 8:44 AM, Alastair Houghton > wrote: > > It has a very high probability of being marked as spam, whatever headers you > use, because it’ll be delivered direct to the recipient’s mail server Oh — I hadn’t thought of that. I sent my test email to myself, so of course it con

Re: Emailing from a daemon process

2016-07-08 Thread Alastair Houghton
On 8 Jul 2016, at 16:13, Sal Conigliaro wrote: > > You can send mail using sendmail without having to configure Postfix or > Sendmail. > > Out of the box OS X can use sendmail to send messages. You can test it by > doing: > > echo “Subject: Email from OX“ | /usr/sbin/sendmail recipi...@domain.c

Re: Emailing from a daemon process

2016-07-08 Thread Jens Alfke
> On Jul 8, 2016, at 8:13 AM, Sal Conigliaro wrote: > > You can send mail using sendmail without having to configure Postfix or > Sendmail. > Out of the box OS X can use sendmail to send messages. I didn’t think this would actually work, but I tried it and it does. It relayed to the SMTP server

Re: Emailing from a daemon process

2016-07-08 Thread Sal Conigliaro
You can send mail using sendmail without having to configure Postfix or Sendmail. Out of the box OS X can use sendmail to send messages. You can test it by doing: echo “Subject: Email from OX“ | /usr/sbin/sendmail recipi...@domain.com (You’ll have to actually include more email headers so it has

Re: Emailing from a daemon process

2016-07-07 Thread Aandi Inston
> > Is there a way to fire off a simple email from an ObjC Foundation-only app running in the background "Just" sending email seems like such a simple thing. But remember, a Mac doesn't come out of the box able to send mail. It only gets that ability if it is set up to do so (during initialisation

Re: Emailing from a daemon process

2016-07-07 Thread Jonathan Mitchell
> On 7 Jul 2016, at 17:13, Carl Hoefs 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. > > The solutions for emailing that I've been able to find (NSWorkspace, > NSSharingSer

Re: Emailing from a daemon process

2016-07-07 Thread Gary L. Wade
Depending on your customers and product, sending these to your server and saving them there could be a support feature allowing you or the user to log in and review them when needed. Even if you don't, almost every web server is set up with sendmail such that you could utilize it instead. -- Gar

Re: Emailing from a daemon process

2016-07-07 Thread Carl Hoefs
> On Jul 7, 2016, at 9:55 AM, Jens Alfke wrote: > > >> On Jul 7, 2016, at 9:44 AM, Carl Hoefs > > wrote: >> >> 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

Re: Emailing from a daemon process

2016-07-07 Thread Doug Hill
Another thing to bring up is that users may not want an open Sendmail server running on their machine just so a background process can send email without the user's intervention. Huh, this is almost like what malware does. Doug Hill > On Jul 7, 2016, at 10:46 AM, Jens Alfke wrote: > > >> On

Re: Emailing from a daemon process

2016-07-07 Thread Jens Alfke
> On Jul 7, 2016, at 10:01 AM, Carl Hoefs > wrote: > > I seem to recall that in the distant past I accomplished issuing emails from > a daemon process on Linux by directly interfacing to /usr/sbin/sendmail. Is > this the 'Postfix mail tools' you mentioned? Yes, and sendmail on macOS is just

Re: Emailing from a daemon process

2016-07-07 Thread Carl Hoefs
> On Jul 7, 2016, at 9:55 AM, Jens Alfke wrote: > > >> On Jul 7, 2016, at 9:44 AM, Carl Hoefs > > wrote: >> >> 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

Re: Emailing from a daemon process

2016-07-07 Thread Jens Alfke
> On Jul 7, 2016, at 9:44 AM, Carl Hoefs wrote: > > 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. The manufacturers are probably running their own SMT

Re: Emailing from a daemon process

2016-07-07 Thread Carl Hoefs
> On Jul 7, 2016, at 9:33 AM, Jens Alfke wrote: > >> On Jul 7, 2016, at 9:13 AM, Carl Hoefs > > 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 c

Re: Emailing from a daemon process

2016-07-07 Thread Jens Alfke
> On Jul 7, 2016, at 9:13 AM, Carl Hoefs 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

Emailing from a daemon process

2016-07-07 Thread Carl Hoefs
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. The solutions for emailing that I've been able to find (NSWorkspace, NSSharingService, LSOpenCFURLRef) all involve launching an email client