- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to e-mail a message in cc & bcc
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2006 02:58 PM
тАО06-24-2006 02:58 PM
now i am using this to send a mail:
#cat file_name | mailx -s "Subject" praveen1@domain1.com,praveen2@domain2.com,praveen3@domain3.com
This sends the mail in "TO" filed.
but i need to send the same mail like:
To: praveen1@domain1.com
Cc: praveen2@domain2.com
bcc: praveen3@domain3.com
how to do that?
thankx
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2006 07:09 PM
тАО06-24-2006 07:09 PM
Solutionmailx can be used for this.
I prefer sendmail because it is more flexible.
Take a look at http://www.hpux.ws/mailfile2
It has code for doing this with sendmail.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2006 05:49 PM
тАО06-25-2006 05:49 PM
Re: How to e-mail a message in cc & bcc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2006 08:21 PM
тАО06-25-2006 08:21 PM
Re: How to e-mail a message in cc & bcc
I use mail which gives me teh possibility to add CC & BCC:
mail -t
From:
Cc:
bcc:
$(ux2dos file|uuencode file.log)
EOF
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2006 02:06 AM
тАО06-26-2006 02:06 AM
Re: How to e-mail a message in cc & bcc
mailx -m -s "Some Subject" somone@somewhere.com < file_for_email_body
2. Mail with attachement, no body -
ux2dos /path_to/some_file | uuencode some_file.txt | mailx -m -s "MAIL FROM Someone" someone@somewhere.com
3. Mail with attachment and body -
ux2dos /path_to/some_file | uuencode some_file.txt | mailx -m -s "MAIL FROM Someone" someone@somewhere.com < file_for_email_body
4. Mail with carbon and blind carbon -
mailx -m -s "Some Subject" somone@somewhere.com < file_for_email_body
(Note that this does not work with the -r option as it disables ~ commands.)
(The file_for_email_body should look like this - )
~c someone_to_cc@somewhere.com
~b someone_to_bc@somewhere.com
The remainder of this file can be the text body of the email.
5. Mail with multiple attachments and body (Leave out the 'This is all you get' if body not desired) -
mailx -m -s "Hello" someone@somewhere.com << END
`ux2dos /home/dlamar/.kshrc | uuencode /home/dlamar/.kshrc.txt`
`ux2dos /home/dlamar/.profile | uuencode /home/dlamar/.profile.txt`
This is all you get.
END
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-26-2006 02:08 AM
тАО06-26-2006 02:08 AM
Re: How to e-mail a message in cc & bcc
export EMAIL_TO=username@receiving.email
export EMAIL_FROM=username@sending.email
export EMAIL_SUBJECT="subject of e-mail"
export EMAIL_BODY=/tmp/body_of_e-mail
export FILE_NAME=filename.txt
export ATTACHED_FILE=/tmp/file_to_attach
{
echo To: $EMAIL_TO
echo From: $EMAIL_FROM
echo Subject: $EMAIL_SUBJECT
echo 'MIME-Version: 1.0'
echo 'Content-type: multipart/mixed; boundary="xxxxyyyzzqzzyyyxxxx"'
echo '--xxxxyyyzzqzzyyyxxxx'
echo ''
cat $EMAIL_BODY
echo '--xxxxyyyzzqzzyyyxxxx'
echo 'Content-Disposition: attachment; filename="'$FILE_NAME'"'
echo ''
cat $ATTACHED_FILE
echo '--xxxxyyyzzqzzyyyxxxx--'
} | /usr/sbin/sendmail $EMAIL_TO