cancel
Showing results for 
Search instead for 
Did you mean: 

how to 'mailx'

SOLVED
Go to solution
miaoxucheng
Advisor

how to 'mailx'

hi ,expert !
another question on 'mailx'
I want mail to many persons using 'mailx' ,but I want to make some as 'CC' ,some as 'TO' .how can I do this ?
thanks

pig
5 REPLIES
Michael Tully
Honored Contributor

Re: how to 'mailx'

Hi,

With each mail recipient, just use a comma
after each one.

e.g

cat my file | mailx -s "my subject" fred@domain.com, joe@domain.com

HTH
-Michael
Anyone for a Mutiny ?
federico_3
Honored Contributor

Re: how to 'mailx'

The solution should be the following:

cat your_file | mailx -s "your subject" user1@domain.com, user2@domain.com


Federico

miaoxucheng
Advisor

Re: how to 'mailx'

hi ,expert
I want to mail to WINDOWS MS Exchenge Server and hope some receivers as "CC" not "TO" ,are you understand ?
Kenny Chau
Trusted Contributor
Solution

Re: how to 'mailx'

Hi,

You can do it on this way:

/usr/bin/mailx -s "testing" abcde@abcde.com < yourfile

In "yourfile", you can type:

~c 12345@abcde.com
~b 34567@abcde.com


~c is cc and ~b is bcc. And the ~c and ~b lines will not appear in the mail contents.

Hope this helps.
Kenny.
Kenny
Paula J Frazer-Campbell
Honored Contributor

Re: how to 'mailx'

Hi
See man mailx.

Input mode :-

~b name ... Add name to the blind carbon copy (Bcc) list.

~c name ... Add name to the carbon copy (Cc) list.

Paula
If you can spell SysAdmin then you is one - anon