Operating System - HP-UX
1754978 Members
3077 Online
108828 Solutions
New Discussion юеВ

How to mention cc, bcc and other server mail id as source in sendmail command

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

How to mention cc, bcc and other server mail id as source in sendmail command

Hi

In my environment i can not send mails to public domains directly.

Ex: # mailx -s "hai" youth@yahoo.co.in

It is not working in my environment.

So we are using our company email "senthil@abc.com"id to send mails to outside world.

We can use mailx command to mention the source emailid.

Ex:

# mailx -s "hai" -r senthil@abc.com youth@yahooc.co.in

Now the mails are sent to "youth@yahoo.co.in" with the from address of "senthil@abc.com".

But what is the issuse is that i cant mention cc and bcc in mailx.

So pls give sollution to following my question:

1) How to do this thru sendmail command with cc and bcc option.

4 REPLIES 4
Dennis Handly
Acclaimed Contributor

Re: How to mention cc, bcc and other server mail id as source in sendmail command

>But what is the issuse is that i cant mention cc and bcc in mailx.

If you use mailx interactively, you can use ~h to set cc and bcc.
Otherwise if you have lines with the following in the body of the message:
~c CC-names
~b BCC-names
senthil_kumar_1
Super Advisor

Re: How to mention cc, bcc and other server mail id as source in sendmail command

I want to use in automated shell script.
James R. Ferguson
Acclaimed Contributor
Solution

Re: How to mention cc, bcc and other server mail id as source in sendmail command

Hi:

Have a look at Dave La Mar's attachment in this post. He shows the syntax for what you seek:

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1017825

Regards!

...JRF...

senthil_kumar_1
Super Advisor

Re: How to mention cc, bcc and other server mail id as source in sendmail command

Hi James R.

I was finding the answer for CC and BCC but
it cant not be worked with -r.