Not sure exactly what you mean by not using a mailer.

In our Perl scripts I tend to do:

open (MAIL, "|-", '/bin/mailx', '-s', $subject, @addresses)
        || die "Failed to e-mail report: $!\n";
print MAIL $report;
close MAIL;

which relies on mailx being installed and able to send messages.

I’m sure there are SMTP modules for Perl, and things like that which could do 
it all at socket level, but I wouldn’t see that as being easier necessarily.  
It depends on what control you have over your server.


From: Sergio Letuche []
Sent: 19 November 2014 08:31
Subject: send emails via perl


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 not use any mailer, is 
this possible? Or could you please suggest us the best - easiest approach?

Thank you

Reply via email to