Re: Fwd: When no MTA is installed, How to send an email with a cronjob?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 07/23/2013 03:07 AM, Indunil Jayasooriya wrote:
> I think your method is the easiest way.

It almost certainly isn't easier than installing ssmtp.  Everything that 
you'd have to to to get ssmtp to work you will also need to do to that 
python code, plus you have to manually send email for every job where 
you need it.

> Should I APPEND the PATH of the script (/root/send_email.py) to
> /root/scripts/backup.sh file. ?
>
> I just ran this script (i.e - /root/send_email.py). It worked. I got the
> email. But no subject there.  How can I add a subject called " CRON JOB
> OUTPUT " to the email receive .

You're going to have to create your own RFC compliant headers.  See how 
that's already more complicated than using ssmtp?  (Cron already does 
that work if you install an MTA, such as ssmtp)

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux