| Author |
how to send mail to multiple recipients
|
|
|
| I need to send mail like this
echo test | mail user1@domain.com user2@domain.com
how do I send mail to multiple people? Is this the right syntax?
| |
| pbeckhelm@gmail.com 2005-03-07, 5:55 pm |
| Check out the man pages for mail and mailx. They'll provide you with
all of the syntax and options for each command and will likely answer
all of your questions and (not) fulfill your wildest dreams ;)
| |
| Heiner Steven 2005-03-11, 5:59 pm |
| tony wrote:
> I need to send mail like this
>
> echo test | mail user1@domain.com user2@domain.com
>
> how do I send mail to multiple people? Is this the right syntax?
while read address
do
echo test | mail "$address"
done < address.list
Heiner
--
___ _
/ __| |_ _____ _____ _ _ Heiner STEVEN <heiner.steven@nexgo.de>
\__ \ _/ -_) V / -_) ' \ Shell Script Programmers: visit
|___/\__\___|\_/\___|_||_| http://www.shelldorado.com/
| |
|
| Begin <423213c9$0$1089$9b4e6d93@newsread2.arcor-online.net>
On 2005-03-11, Heiner Steven <heiner.steven@nexgo.de> wrote:
> tony wrote:
man mail appears to affirm that, yes. On my system, at least.
[vbcol=seagreen]
> while read address
> do
> echo test | mail "$address"
> done < address.list
You can do that, too, of course. Having less bodies in the spool does
seem appealing, but if sending to strangers one may not want to show
everybody every other address in the To: line.
For which case I tend to construct a list of SMTP commands in a file
and feed it to the MTA directly. But before OP tries that, first read
at least rfcs 821 and 822 and consider that we already have more spam
to go round a couple of times over.
--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
| |
|
| for in in user1@domain.com user2@domain.com
do
echo test | mail $i
done
hope this help not for spam
"tony" <none@none.com> escribió en el mensaje
news:d0i9rc$f0h$1@news.Stanford.EDU...
>I need to send mail like this
>
> echo test | mail user1@domain.com user2@domain.com
>
> how do I send mail to multiple people? Is this the right syntax?
>
|
|
|
|