HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Send both attached file and different file as body...
Operating System - HP-UX
1831321
Members
3014
Online
110023
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
03-27-2008 07:45 AM
03-27-2008 07:45 AM
I'm currently successfully sending an rtf file as an attachment with the following command.
uuencode summary.rft summary.rtf |mailx -m -s "Summary Report" recipient@destination.org
This is the only way I've been able to send the file as an attachment and have it open in MS Word correctly and without errors.
Unfortunately they now want me to include another file (cover.txt) in the body of the same email. I've searched the forums, but can't find how to do both in the same email.
Suggestions?
uuencode summary.rft summary.rtf |mailx -m -s "Summary Report" recipient@destination.org
This is the only way I've been able to send the file as an attachment and have it open in MS Word correctly and without errors.
Unfortunately they now want me to include another file (cover.txt) in the body of the same email. I've searched the forums, but can't find how to do both in the same email.
Suggestions?
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 08:19 AM
03-27-2008 08:19 AM
Solution
Shalom,
The attached script can be modified to do the job.
Normally I send a link but DNS is not working well here today.
SEP
The attached script can be modified to do the job.
Normally I send a link but DNS is not working well here today.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
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
03-27-2008 08:29 AM
03-27-2008 08:29 AM
Re: Send both attached file and different file as body.
Hi Terrence:
#!/usr/bin/sh
mailx -m -s "Stuff..." whoever@somewhere.com << END
$(ux2dos /etc/hosts | uuencode /etc/hosts)
This is all I care to say!
END
Regards!
...JRF...
#!/usr/bin/sh
mailx -m -s "Stuff..." whoever@somewhere.com << END
$(ux2dos /etc/hosts | uuencode /etc/hosts)
This is all I care to say!
END
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2008 09:25 AM
03-27-2008 09:25 AM
Re: Send both attached file and different file as body.
Wow, talk about prompt answers from two heavy hitters!
Here's the simplified solutions for anyone who might be searching on this issue in the future.
The file to be attached is called summary.rtf, and the file that's going to be in the body is called cover.txt
Steven's solution boils down to this:
uuencode summary.rtf summary.rtf >> cover.txt
cat cover.txt | /usr/sbin/sendmail -t address@address.com
James' solution is as he writes except since I have a file that's going to be the body, a slight change is made. Also James' solution has the advantage of allowing a subject.
mail -m -s "Summary Report" address@address.com << END
$(ux2dos summary.rtf | uuencode summary.rtf)
`cat cover.txt`
END
Gracias Friends!
Here's the simplified solutions for anyone who might be searching on this issue in the future.
The file to be attached is called summary.rtf, and the file that's going to be in the body is called cover.txt
Steven's solution boils down to this:
uuencode summary.rtf summary.rtf >> cover.txt
cat cover.txt | /usr/sbin/sendmail -t address@address.com
James' solution is as he writes except since I have a file that's going to be the body, a slight change is made. Also James' solution has the advantage of allowing a subject.
mail -m -s "Summary Report" address@address.com << END
$(ux2dos summary.rtf | uuencode summary.rtf)
`cat cover.txt`
END
Gracias Friends!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP