|
Home > Archive > Unix Shell > April 2004 > Send mails/attachments using a shell script
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Send mails/attachments using a shell script
|
|
| Shashi 2004-04-11, 3:31 pm |
| 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
| |
| William Park 2004-04-11, 3:31 pm |
| Shashi <provo1234@hotmail.com> 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?
SCO.
--
William Park, Open Geometry Consulting, <opengeometry@yahoo.ca>
Linux solution/training/migration, Thin-client
| |
| Alan Connor 2004-04-11, 3:31 pm |
| On 10 Apr 2004 00:32:05 GMT, William Park <opengeometry@yahoo.ca> wrote:
>
>
> Shashi <provo1234@hotmail.com> wrote:
>
> SCO.
>
> --
> William Park, Open Geometry Consulting, <opengeometry@yahoo.ca>
> Linux solution/training/migration, Thin-client
<chortle>
AC
| |
| Heiner Steven 2004-04-14, 2:38 pm |
| Shashi wrote:
[...]
> O.S: SCO Unixware
>
> How can I send mails using a shell script? [...]
Maybe the following article can help:
http://www.shelldorado.com/articles...ttachments.html
Heiner
--
___ _
/ __| |_ _____ _____ _ _ Heiner STEVEN <heiner.steven@nexgo.de>
\__ \ _/ -_) V / -_) ' \ Shell Script Programmers: visit
|___/\__\___|\_/\___|_||_| http://www.shelldorado.com/
| |
|
|
| --==[bman]==-- 2004-04-22, 7:34 pm |
| 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.
|
|
|
|
|