Sending mail using script

This is the sample script to send mail using script. I have used perl . You can try with shell script also , with the same way.

— Contents of testmail.pl —
#!/usr/bin/perl

$mailcmd=”/usr/lib/sendmail -t << EOF
To: linux-cloud@nodomain.com
From : linux-cloud@nodomain.com
Subject : Linux-cloud cars

I love luxury Cars, SUV

EOF”;

`$mailcmd`;
# script ends

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

Fixing corrupted vmdk file

Next Post

Vmware Virtual machine monitoring tools

Related Posts

SSHFS

Worried about often copying files to remote machines using ftp or scp ?. Try using fuse-sshfs .  You…
Read More