04-23-04 12:34 AM
Shashi wrote:
> Hi there,
>
> O.S: SCO Unixware
>
> How can I send mails using a shell script? I see that there is a
> "sendmail" daemon program running on my machine. But when I type, mail
> provo1234@hotmail.com < filename.txt
> I get the following error message..
> "buildaddr: no mailer in the parsed address saved message to
> /home/dead.letter"
>
> What could be the problem? I tried the same command on a solaris
> machine and it worked.
>
> Thanks in anticipation.
> Shashi
I assume you have following on your system: sendmail and uuencode
From your shell script:
{
echo "From: Your Name <yourid@yourdomain.com>"
echo "To: To your user <youruser@domain.com>"
echo "Subject: Whatever you want to put here"
echo ""
echo "If you feel like typing
you can continue for whater length you want"
echo "Use your imagination"
/usr/bin/uuencode myfile.tar.gz myfile.tar.gz
} | /usr/sbin/sendmail -t
You're done. Make it a function or whatever and make it re-usable. No
third party mail clients are necessary (elm, mutt, mailx, or whatever).
--
__ _
/ / (_)___ __ ___ __
/ / / / __ \/ / / / |/_/
/ /___/ / / / / /_/ /> <
/_____/_/_/ /_/\__,_/_/|_| is what you make of it.
[ Post a follow-up to this message ]
|