- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- send attachment via elm from command line
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
11-29-2000 02:11 PM
11-29-2000 02:11 PM
This is what I am trying:
1. filename=/uxx/xxx/xxxx.txt (I use absolute path and filename when setting $filename).
2. elm -s "test" me@trtn.com < include.file
3. My include.file looks like this:
[include $filename application/octet_stream base64]
It doesn't like the use of a variable in the include statement (says Include file can't be found)...is there a way around this? I have also played with "uuencode $filename $filename|sendmail me@trtn.com", but this produces a binary file....I need the attachment to be an ascii text file.
Any suggestions would be greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2000 02:24 PM
11-29-2000 02:24 PM
SolutionYou could create the include.file 'on the fly', so to speak. When you know what the $filename is going to be, youcan issue the following command:
echo "[include" $filename "application/octet_stream base64]" > include.file
Then elm won't have a problem with the filename substitution.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2000 02:26 PM
11-29-2000 02:26 PM
Re: send attachment via elm from command line
I am not really familiar with elm MUA, but have you tried sending your file this way:
elm -s "test" me@trtn.com < /uxx/xxx/xxxx.txt ?
Each time I want to send an attached ascii file
to a mail, I am issuing:
mailx -s "test" me@trtn.com < myfile
And it works perfectly !
I hope this helps.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2000 02:37 PM
11-29-2000 02:37 PM
Re: send attachment via elm from command line
You just need to edit the file to be sent as an attachment, and put the following line first (assuming your file is named filename.txt):
[include filename.txt text/plain base64]
And then run elm -s "test" me@trtn.com < /path/to/your/filename.txt
And this should do the trick!
But you can also consider mailx, hich is also great!
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2000 06:11 AM
11-30-2000 06:11 AM
Re: send attachment via elm from command line
I had already tried the method suggested by Frederic, but the attachment would include the "include" statement, it doesn't get stripped out. The file I am sending is a fixed format datafile, ready for loading into a database, and I did not want to request that they skip the first line.
It's perfect now, thanks a lot for the suggestions.