- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- batch eml sendmail: how to CC: ??
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
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
тАО11-04-2003 08:03 AM
тАО11-04-2003 08:03 AM
I"m using this line in my script:
elm -s "$SUBJECT" -a $MAILTO < body1
To send it to multiple guys I list @addresses thru the comma, but just curiose is there any way to say EML that any particular address should be CC: (or BC:). Couldn't find any info yet.
I need it to run in shell, not from command line.
THanks to all
Vittoiro
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2003 08:05 AM
тАО11-04-2003 08:05 AM
Re: batch eml sendmail: how to CC: ??
This script does attachments too.
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
тАО11-04-2003 08:10 AM
тАО11-04-2003 08:10 AM
Re: batch eml sendmail: how to CC: ??
I can't use this script, it's still interactive + I have some system limitation to stick with ELM.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2003 08:30 AM
тАО11-04-2003 08:30 AM
Re: batch eml sendmail: how to CC: ??
like:
elm -s "subject" -a user1 -c ccuser < file
I thought -c was for carbon copy, and -b was for bcc?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2003 08:40 AM
тАО11-04-2003 08:40 AM
Re: batch eml sendmail: how to CC: ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2003 09:23 AM
тАО11-04-2003 09:23 AM
SolutionThis is not easy non-interactive in either elm or mailx.
The only way I think you can do this in mailx is to embed at the beginning of the input file to the mailx command a
~c ccaddress@abc.com
~b bccaddress@abc.com would be a blind carbon copy.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2003 10:54 AM
тАО11-04-2003 10:54 AM
Re: batch eml sendmail: how to CC: ??
Our shop uses mailx extensively. Attached are some samples, one of which should help you out.
Best of luck.
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2003 07:11 PM
тАО11-04-2003 07:11 PM
Re: batch eml sendmail: how to CC: ??
Dave's answer is perfect as we too use the same syntax in our scripts
Cheers
Rups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2003 06:44 AM
тАО11-05-2003 06:44 AM
Re: batch eml sendmail: how to CC: ??
couldn't make work with attachment yet, thought followed all you samples.
Is there any option to specify FROM@MAIL.COM address with mailx ?
Thanks
Vlad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2003 06:58 AM
тАО11-05-2003 06:58 AM
Re: batch eml sendmail: how to CC: ??
Both -
Mail with attachement, no body -
ux2dos /path_to/some_file | uuencode some_file.txt | mailx -m -s "MAIL FROM Someone" someone@somewhere.com
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
- are used extensively in our shop with no problems.
May I see the syntax of what you are attempting.
Have not investigated changing the from name; it defaults to the user executing the mailx and I would think it a security issue to allow change of this.
Best regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2003 08:55 AM
тАО11-05-2003 08:55 AM
Re: batch eml sendmail: how to CC: ??
cat attach|mailx -m -s "$SUBJECT" $MAILTO < $BODY
Both work fine but can't attach
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2003 09:08 AM
тАО11-05-2003 09:08 AM
Re: batch eml sendmail: how to CC: ??
The first one:
1. Insure you specifiy full path to "attach" (and of course, that it exists).
2. Insure there are values assigned to "$SUBJECT" $MAILTO and $BODY.
i.e. ux2dos /home/vittoiro/.profile | uuencode profile.txt | mailx -m -s "Here is My Profile"
someone@somewhere.com < /some_path_to/Some_file_containing_your_lines_for_the_body_of_the_email
Sorry, if I am over simplifing.
Hang in there.
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2003 06:23 AM
тАО11-11-2003 06:23 AM
Re: batch eml sendmail: how to CC: ??
Thanks for you posts. It's too simple to believe that I still don't have attachment going thru.
I played extensevely with /full/path.
$MAIL $BODY are well defined, I can see them in recieved email.
Is there any .config file, like in sendmail ?
or ??
So far I switched to ELM that works fine.
Thanks
Vlad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-11-2003 07:14 AM
тАО11-11-2003 07:14 AM
Re: batch eml sendmail: how to CC: ??
Try this sample:
ux2dos /home/vittoiro/.profile | uuencode profile.txt | mailx -m -s "Here is My Profile"
vittoiro@your_email_address.com < /home/vittoiro/.profile
That should send your .profile both as an attachment and in the body of the email.
(vittoiro@your_email_address.com needs to be your valid email address)
Also note, I stand corrected on changing the from email address.
While I do not like this from a security standpoint, the email can look as though it came from someone else by using the -r option.
i.e. -r pope_paul@vatican.com
Best regards,
dl