1758586 Members
1754 Online
108872 Solutions
New Discussion юеВ

mailx send one e-mail

 
SOLVED
Go to solution

mailx send one e-mail

Hi,

I have created the following entries in the /etc/mail/aliases file. When I use the "mailx senthil < /etc/passwd" command it send the email to the xyz@hp.com e-mail address. It did not send the e-mail to the first person. How do I create the froup e-mail so that it can send to all the uers

Entries in the /etc/mail/aliases file:
senthil : abc@hp.com
senthil : xyz@hp.com


Regards
Senthil
5 REPLIES 5
Stefan Farrelly
Honored Contributor
Solution

Re: mailx send one e-mail


If you want an alias to go to multiple email addresses you need the following format;

senthil : abc@hp.com,zyx@hp.com

(all one line - not 2 entries as you have)
Im from Palmerston North, New Zealand, but somehow ended up in London...
Thierry Poels_1
Honored Contributor

Re: mailx send one e-mail

Hi,

just put the recipients on the same line divided by commas in the /etc/mail/aliases file:

senthil : abc@hp.com,xyz@hp.com

(and execute newaliases after the modification off course)

good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Fred Martin_1
Valued Contributor

Re: mailx send one e-mail

FYI, the entries can be on more than one line. Just be sure there are commas after each entry except the last one....

boys : john, harry,
tom, larry
girls : june, elaine, linda,
barb

We do this because we have many names in some aliases, but still want the file to print easily without wrapping etc. so don't like long lines.

Fred
fmartin@applicatorssales.com
Rich Wright
Trusted Contributor

Re: mailx send one e-mail

... or put the list of recipiants into a file and use an alias file entry like this.
test_mail: :include:/etc/mail/test.list

This can be easier to maintain when using multiple lists.
Arockia Jegan
Trusted Contributor

Re: mailx send one e-mail

Hi,

Whenever you send mails by using alias, it will refer the last alias if the /etc/mail/aliases file has more than one alias entries.

So you should change it to,
senthil:abc@hp.com,xyz@hp.com

This will send e-mails to both users.