" how to write a script to send an error in a log file to a particular E-Mail ID "
Can anyone help me in this ?
Regards
" how to write a script to send an error in a log file to a particular E-Mail ID "
Can anyone help me in this ?
Regards
try uuencode..
/usr/bin/uuencode attachment email_attachment.lst > message.txt
cat body_of_message > message.txt
mail-s "Subject line of message" <email address> < message.txt
Kindly explain me in detail. I am new to scripting
Here is something you can try..
/usr/bin/uuencode attachment_file.txt email_attachment.lst > attachment.txt
#concatenate message.txt and attachment.txt into combined.txt
cat message.txt attachment.txt > combined.txt
#email combined.txt file. this file has the body of the email and the attachment
mail -s "Message with Attachment" <YOUR EMAIL> < combined.txt