- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Attaching files to email messages
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
Forums
Discussions
Discussions
Discussions
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
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-21-2001 09:40 AM
05-21-2001 09:40 AM
I?ve found out how to attach text files to an email. It?s just put a header on it and use sendmail with -t option. I?m using:
cat header attachment.txt | sendmail -t
Where header contents is:
DSV$ more header
To: email@domain.com
Content-Type: multipart/mixed;
boundary="----_NextPart_000_01C0DFDE.6EF1A3BC"
It works fine for text or ascii file but I need to write a script which accepts any kind of attachment (.exe, .pdf, etc...)
I tested it for a .pdf file and the file arrived as attached but it was corrupted and couldn?t be open.
The problem is the cat command, which open the pdf file. What I need to do is use some command or anything to put the header lines before the file that I want to attach.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2001 09:44 AM
05-21-2001 09:44 AM
Re: Attaching files to email messages
http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x41950559ff7cd4118fef0090279cd0f9!0,00.html
Just a thought,
/rcw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2001 09:47 AM
05-21-2001 09:47 AM
Re: Attaching files to email messages
you can also use:
mailx -s "Subject"
for example:
mailx -s "PROBLEM" ric@iii.com < /tmp/sss.exe
good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2001 01:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2001 02:01 PM
05-21-2001 02:01 PM
Re: Attaching files to email messages
My favorite way to do it is with elm include statements:
e.g.
To: Yogi
Text stuff
More Text
[include myfile.dat application/octet-stream base 64]
More text 2.
[include myfile2.dat application/octet-stream base 64]
Let's say that the above was in a text file called F2.
elm -s "Transfer Files Subject" booboo@mother.com < F2.
The nice feature here is that multiple attachments are easy. Take care that your include statements have no leading white space and are contained on 1 line.
If you are running 10.20 you will need to patch elm (PHNE_15835).
Regards, Clay