send emails via perl

2014-11-19 Thread Sergio Letuche
hello, we need to use the easiest solution, if possible just use a perl module, to be able to send automated emails on an Ubuntu server. The scenario is this: we ran a cron job, and say we would like to send a message after completion, to a certain for example gmail account. The ideal would be to

Re: send emails via perl

2014-11-19 Thread Cory Snavely
I've always used this: http://search.cpan.org/~markov/MailTools-2.13/lib/Mail/Mailer.pod On 11/19/2014 09:22 AM, Sergio Letuche wrote: ok this is what i asked, could a mail be sent without mailx been installed, thank you 2014-11-19 16:19 GMT+02:00 PHILLIPS M.E. m.e.phill...@durham.ac.uk

RE: send emails via perl

2014-11-19 Thread Gorman, Jon
In the past I've also done it without using a module by just doing a very bare bones Net::SMTP session if I remember right. That's included in perl in most recent versions if I remember right. (I'd have to dig around to find where I've used it, it's rare as in most cases I prefer the approach

Re: send emails via perl

2014-11-19 Thread Marc Chantreux
On Wed, Nov 19, 2014 at 02:19:26PM +, PHILLIPS M.E. wrote: open (MAIL, |-, '/bin/mailx', '-s', $subject, @addresses) || die Failed to e-mail report: $!\n; what's the point of using perl then? -- Marc Chantreux, Mes coordonnées: http://annuaire.unistra.fr/chercher?n=chantreux

Re: send emails via perl

2014-11-19 Thread Sergio Letuche
i do not object to any approach suggested, all are welcome 2014-11-19 16:46 GMT+02:00 Marc Chantreux m...@unistra.fr: On Wed, Nov 19, 2014 at 02:19:26PM +, PHILLIPS M.E. wrote: open (MAIL, |-, '/bin/mailx', '-s', $subject, @addresses) || die Failed to e-mail report: $!\n;

RE: send emails via perl

2014-11-19 Thread PHILLIPS M.E.
On Wed, Nov 19, 2014 at 02:19:26PM +, PHILLIPS M.E. wrote: open (MAIL, |-, '/bin/mailx', '-s', $subject, @addresses) || die Failed to e-mail report: $!\n; what's the point of using perl then? There's more than one way to do it. If mailx is already installed and configured

Re: send emails via perl

2014-11-19 Thread Marc Chantreux
On Wed, Nov 19, 2014 at 04:47:59PM +0200, Sergio Letuche wrote: i do not object to any approach suggested, all are welcome based on my own experience (experience feedback is something i expect when i ask something in a list): * don't use perl when i don't need it (when it's about sending

Re: send emails via perl

2014-11-19 Thread Marc Chantreux
On Wed, Nov 19, 2014 at 02:51:58PM +, PHILLIPS M.E. wrote: If mailx is already installed and configured then this allows you to send your e-mail from your Perl script without installing other modules. I have sometimes had to use servers where installing extra modules from CPAN was not