- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Using mailx to sned file as 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
тАО02-23-2004 11:47 AM
тАО02-23-2004 11:47 AM
Using mailx to sned file as attachment
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 11:49 AM
тАО02-23-2004 11:49 AM
Re: Using mailx to sned file as attachment
I do have a very flexible script that does it with sendmail.
See attachment.
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
тАО02-23-2004 12:08 PM
тАО02-23-2004 12:08 PM
Re: Using mailx to sned file as attachment
$ for e in `echo file1 file2 file3`
do
uuencode $e $e.txt
done | mailx -m -s "mymail" username@domain.com
Make sure that you use the correct suffix for the file being used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 05:45 PM
тАО02-23-2004 05:45 PM
Re: Using mailx to sned file as attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 05:53 PM
тАО02-23-2004 05:53 PM
Re: Using mailx to sned file as attachment
http://www.unixblog.com/quick_unix_tips/mailx_and_attachments.php
-Karthik S S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2004 09:40 PM
тАО02-23-2004 09:40 PM
Re: Using mailx to sned file as attachment
************************************
You can also do it within a script that also sends some output of other commands in between, like backup commands etc:
{
echo "start of email, with attaching a text file\n"
ux2dos textfile1.txt | uuencode textfile1.txt
echo "\n start of some command"
echo "now send binary file\n"
uuencode binaryfile1.bin binaryfile1.bin
echo "\n end of email, blabla...."
}| mailx -m -s "mymail" username@domain.com
HTH,
Peter Geluk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2004 01:16 AM
тАО02-24-2004 01:16 AM
Re: Using mailx to sned file as attachment
Mpack and munpack are utilities for encoding
and decoding (respectively) binary files in
MIME (Multipurpose Internet Mail Extensions)
format mail messages.
http://hpux.ee.ualberta.ca/hppd/hpux/Users/mpack-1.5/
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2004 02:08 AM
тАО02-24-2004 02:08 AM
Re: Using mailx to sned file as attachment
mailx is a messaging/broadcasting utility. Not a true emailing utility like elm or sendmail. With that said....
There a few ways to do this...
uuencode is one, but if your using this for clients you could run into issues of decoding it.
Then there is a third party software you could use like mpack. Can't comment on this, but folks on the Forums have used it.
My personal favorite is to use the include statement. It's quick & easy and great for scripting with..In other words you have a file, can be any kind, even an Excel spreadsheet on your UNIX box. You simply create dummy include file (I'll call it include.file) with the following information to point to the file to be attached:
[include
or maybe for a simple text file:
[include
and from your command line:
elm -s "This is a test" yourname@company.com < include.file
To see more examples of this subject just do a search and browse and enjoy...
Rgrds,
Rita