- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: In Linux, how to send a file as an 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
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
07-31-2006 10:04 AM
07-31-2006 10:04 AM
In Linux, how to send a file as an attachment to our mail box
Hi,
In Linux, how to send a file as an attachment to our mail box.
In Unix, the following command works fine
unix2dos m | uuencode m.txt | mailx -s "Testing attachment mail" radhakrishnan.ezhilarasan@ubs.com
But in Linux, it is comming as empty file.
That means coversion is wrong.
Please help how to do this in Linux.
Regards
Ezhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2006 11:37 AM
07-31-2006 11:37 AM
Re: In Linux, how to send a file as an attachment to our mail box
First, try the command again with 'mailx -m -s' ('-m'="MIME headers") substituted. If that doesn't work, verify that you have 'unix2dos' (or 'ux2dos') and 'uuencode' installed on your system, and that they are in your $PATH, and that you have permission to execute. Also make sure that you can send a different attachment directly from 'mailx'. Then build up the command slowly, incrementally testing each stage:
# unix2dos m | less
If that works, then:
# unix2dos m | uuencode m.txt | less
Then try sending the attachment to a local account:
# unix2dos m | uuencode m.txt | mailx -m -s "Testing attachment mail" root
Then:
unix2dos m | uuencode m.txt | mailx -m -s "Testing attachment mail" radhakrishnan.ezhilarasan@ubs.com
If this yields the same result, make sure that attachments aren't being corrupted/stripped by your mail gateway or your email client.
Finally, you can give SEP's famous mailfile attachment script a try:
http://www.hpux.ws/mailfile2
Good luck,
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2006 07:08 PM
07-31-2006 07:08 PM
Re: In Linux, how to send a file as an attachment to our mail box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2006 08:22 PM
07-31-2006 08:22 PM
Re: In Linux, how to send a file as an attachment to our mail box
echo "here comes a message that will appear in the body"|mutt -a filename_to_attach -s "message that will appear in the subject" email@address.com
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2006 10:10 AM
08-01-2006 10:10 AM
Re: In Linux, how to send a file as an attachment to our mail box
Aside from other's comments, attached is an inhose doc on the use of mailx for HP-UX.
Not sure how Linux will interpret all and have never seen the command unix2dos. Though, as you'll see in the doc, we make extensive use of ux2dos.
Regards,
-dl