Sending Mail from Sh


Ever wanted to send email from the shell, but also to give it a Mime type so that the mail reader doesn’t just put your attachment straight into the body of the message ( envoking mail < myattachment , will include the attachment but won’t split the message up). Well this handy little example will let you from an easy to modify Perl script:

You will have install the MIME-lite bits and pieces: but thats no big deal really. I now have backup .tar.gz and more being emailed from my servers nightly as a cron job.

comments powered by Disqus