Sendmail with attachment

Hello people,
I only have sendmail and uuencode on a Oracle (RH) linux server.
While:

/usr/bin/uuencode awr.html awr.html | /usr/sbin/sendmail myemail@company.com

Is working fine,
the ideal for me is to do something like:

echo "To: me@company.com" > /home/vasilis/msg.txt
echo "Subject: DB Notification" >> /home/vasilis/msg.txt
echo "Content-Type: text/plain" >> /home/vasilis/msg.txt
echo "X-Priority: 1 (Highest)" >> /home/vasilis/msg.txt
echo "X-MSMail-Priority: High" >> /home/vasilis/msg.txt
cat /home/vasilis/welcome.txt >> /home/vasilis/msg.txt


/usr/sbin/sendmail -t < /home/vasilis/msg.txt

Any idea how to include:

/usr/bin/uuencode awr.html awr.html

In the above script since I need to add an attachment?

Thank you in advance for any help.

Please search within the forums. There are lots of threads available for this including threads suggested at the bottom of this page.

Only one of the below cases match to my problem, but I am still unable to make it work. Any help appreciated.

Have you searched? I have got this at first attempt.

1 Like