- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- mailx question - both text in body and attachment
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
тАО05-27-2008 12:25 PM
тАО05-27-2008 12:25 PM
I am familiar with this to get attachment
ux2dos file | uuencode file | mailx -m -s "subject" emailaddress
I am familiar with this to get text in body
mailx -s "subject" emailaddress < textinbody
Any help would be greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2008 12:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2008 03:59 PM
тАО05-27-2008 03:59 PM
Re: mailx question - both text in body and attachment
Won't work with mailx
http://www.hpux.ws/?p=7
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
тАО05-28-2008 05:59 AM
тАО05-28-2008 05:59 AM
Re: mailx question - both text in body and attachment
Points assigned.
The sendmail solution worked in my situation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2008 06:50 AM
тАО05-28-2008 06:50 AM
Re: mailx question - both text in body and attachment
Maybe I should put this question in the scripting forum.
At the same time as emailing, I need to replace some characters in "infile".
The below example is doing what I want.
Except I would like to eliminate the creation of "outfile" on the disk.
I am hoping to do in the one command without the "outfile" file ever getting created on disk.
This example gives me "anotherfile" text in the email body and "attfile" as the attachment.
(echo "subject: subjecttext"; tr -d "\036" < infile | tr "\047" "\012" > outfile; cat anotherfile; uuencode outfile attfile) | /usr/sbin/sendmail emailadd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2008 09:32 AM
тАО05-28-2008 09:32 AM
Re: mailx question - both text in body and attachment
It may not be worth the complexity if you don't understand the changes. Any reason you care about this extra file?
(echo "subject: subjecttext";
cat anotherfile;
tr -d "\036" < infile | tr "\047" "\012" |
uuencode attfile) | /usr/sbin/sendmail emailadd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2008 11:38 AM
тАО05-28-2008 11:38 AM
Re: mailx question - both text in body and attachment
Worked perfectly.
Exactly what I wanted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2008 12:51 PM
тАО05-28-2008 12:51 PM
Re: mailx question - both text in body and attachment
the long pipeline, debugging anything
'without the "outfile" file ever getting
created on disk' may be difficult. Sometimes
those pesky temporary files can be handy.