- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to send an email with multiple attachements.
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
06-04-2002 12:10 PM
06-04-2002 12:10 PM
I was wondering how it could be possible on a HP-UX 10.20 Operating System to send multiple email attachements in 1 email. Here is the email I have right now. The problem is that only 1 attachement is sent. PLZ help!!!
(
echo "From:xxxx"
echo "To: xxxx"
echo "Subject: Test"
echo "\nPlease find enclosed login information required to use....."
uuencode doc1.doc doc2.doc) | /usr/sbin/sendmail xxxxx@site.ca
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2002 12:17 PM
06-04-2002 12:17 PM
SolutionSimply include the following syntax in your mail textfile (e.g) my_message
-----------------
This is some sample text.
[include myfile1 application/octet-stream]
This is some more stuff.
[include myfile2 application/octet-stream]
That's all folks
------------------
Then, elm -s "Sample Subject" somebody@abc.com < my_message
The above will generate 2 separate attachments.
The only requirement is that you must first create a .elm directory in the sender's home directory; the command-line version will not automatically create the .elm directory unlike the interactive version of elm. The above will attach myfile1 and myfile2. You must also have a MIME enabled version of elm (PHNE-15835 or later on 10.20).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2002 12:39 PM
06-04-2002 12:39 PM
Re: How to send an email with multiple attachements.
Please look at this document :
http://www3.primushost.com/~kylet/unix-att.html
Z-Mail - The grand daddy of all email user agents. :-) This is using the zmail.small binary that has none of the GUI code so it uses less resources to run.
For a single file:
cat $TXTFILE | zmail.small -subject "$SUBJECT" -attach application/octet-stream:${ATTFILE} $MAILTO
Bart Schaefer offers the following for multiple attachments. (untested by myself)
zmail.small -rf /dev/null -e 'mail -z -s "$SUBJECT" $MAILTO' -e 'compcmd attach-file $ATTACHFILE application/msword base64 "$DESCRIPTION"' \ -e! 'compcmd send'
You can repeat the -e 'compcmd attach-file ...' as often as necessary to
attach more than one file. The -z in the mail command tells it not to
go interactive, but rather to wait for compcmds to tell it what to do.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2002 04:02 PM
06-04-2002 04:02 PM
Re: How to send an email with multiple attachements.
Here is fairly simple method for sending multiple files.
for e in `echo file1 file2 file3`
do
uuencode $e $e.txt
done|mailx -m -s "mymail" username@domain.com
Change ".txt" to the proper format of the file e.g. .xls for excel, .doc for word etc
HTH
~Michael~
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2002 04:29 PM
06-04-2002 04:29 PM
Re: How to send an email with multiple attachements.
Your line:
uuencode doc1.doc doc2.doc
is encoding the the doc1.doc and renaming it doc2.doc.
It's important, for your END-USER's mail program to have the CORRECT suffix on files. Fortunately M$ Word can handle a text file, even though it's named SOMETHING.doc, but had it been .pdf, it would have failed.
for i in `echo filename1 filename2 filename3 ...`
do
uuencode $i $i.txt
done|mailx -m -s "test" username@whereever.com
The key is to have the right "suffix" on the uuencode line:
uuencode filename filename.txt
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2002 09:43 PM
06-04-2002 09:43 PM
Re: How to send an email with multiple attachements.
mailx -s "multiple attachments" abc@xyz.com <
~< !uuencode /tmp/file1.txt file1.doc
This is the second attachment sent as wordpad
~< !uuencode /tmp/file2.txt file2.txt
EOF
Thanks
AR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2002 04:59 AM
06-05-2002 04:59 AM
Re: How to send an email with multiple attachements.
mailx -m -s "Subject text" $sendto 1>/dev/null << __EOF__
First attachment
$(cat $textfile | ux2dos - | uuencode ${program}.txt)
Second attachment
$(cat $binfile | uuencode ${binfile})
Rest of message
__EOF__