1.31.2012

Solaris: send mail with attachment from Solaris command line


I like to use this function bellow in my profile to send files to my mail account as attachements; to use in your profile simply replace EMAIL@ADDRESS with your email address  on a mail enabled host:

function  mailme(){


        /usr/bin/uuencode $(echo $1) $(echo $1)|/usr/bin/mailx -s "mailme from $(/usr/bin/hostname)" EMAIL@ADDRESS
}

No comments: