- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to email multiple attachments?
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
10-01-2004 02:15 AM
10-01-2004 02:15 AM
how to email multiple attachments?
Thank you for all your help to resolve my email problem. My next question is how to email multiple attachments?
Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2004 02:19 AM
10-01-2004 02:19 AM
Re: how to email multiple attachments?
http://hpux.connect.org.uk
Option 2 - Some code
for i in 'file1 file2`
do
uuencode ${i} ${i}.txt | mailx -s "subject" abc@xyz.com
done
Option3 - Use email.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2004 02:23 AM
10-01-2004 02:23 AM
Re: how to email multiple attachments?
nemo:/home/jpcast> more envia2
#!/usr/bin/ksh
# Envio de mails de texto con sendmail
# ./envia2 "Subject" "Cuerpo del Mensaje" "Fich 1" "Fich 2" "destinatario"
# Envio de dos ficheros adjuntos a un destinatario
(
echo "To: $5"
echo "Subject: $1"
echo "MIME-Version: 1.0"
echo "Content-Type: multipart/mixed; boundary="mimail""
echo "Content-Transfer-Encoding: 7bit"
echo ""
echo "--mimail"
echo "Content.Type: text/plain; charset=ISO-8859-1; name="BDY-TXT""
echo "Content-Disposition: inline; filename="BDY.TXT""
echo "Content-Transfer-Encoding: 7bit"
echo ""
echo " $2 "
echo ""
echo "--mimail"
echo "Content.Type: text/plain; charset=ISO-8859-1; name="$3.txt""
echo "Content-Disposition: attachment; filename="$3.txt""
echo "Content-Transfer-Encoding: 7bit"
echo ""
cat $3
echo "--mimail"
echo "Content.Type: text/plain; charset=ISO-8859-1; name="$4.txt""
echo "Content-Disposition: attachment; filename="$4.txt""
echo "Content-Transfer-Encoding: 7bit"
echo ""
cat $4
echo "--mimail--"
)| sendmail â t
I did once this script to send several attachments in the same mail modifying the encoding. This one is useful for text files .
There are another popular executable , called sendplus, which can help you to easily send attachemnts with the correct codificat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2004 02:23 AM
10-01-2004 02:23 AM
Re: how to email multiple attachments?
if [ -s /home/pzanwar/mm* ]
then
ll /home/pzanwar/mm* |/usr/bin/mailx -s"Attached" my_email
fi
Hope it helps
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2004 02:24 AM
10-01-2004 02:24 AM
Re: how to email multiple attachments?
uuencode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2004 02:26 AM
10-01-2004 02:26 AM
Re: how to email multiple attachments?
You can use uuencode command with mail(x) command to attach files. Search 'uuencode' in iITRC forums. You must found a lot of threads on this.
Regards
JMB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2004 02:30 AM
10-01-2004 02:30 AM
Re: how to email multiple attachments?
This is good one, just for reference..Dont assign points on this pls.
It's almost repeated.
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2004 02:31 AM
10-01-2004 02:31 AM
Re: how to email multiple attachments?
Read more here about mail attachments on mailx as
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=678936
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2004 02:45 AM
10-01-2004 02:45 AM
Re: how to email multiple attachments?
If the FILES are text files, and you want the recieving email user to get them as attachments, then you must fake the recieving email program out and tell it that they are "txt" files:
for i in `echo filename1 filename2 filename3`
do
uuencode $i $i.txt
done|mailx -m -s "test" username@whereever.com
or if they are to be treated as is, then:
for i in `echo filename1 filename2 filename3`
do
uuencode $i $i
done|mailx -m -s "test" username@whereever.com
Either way, you MUST use the "-m" option on mailx.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2004 02:54 AM
10-01-2004 02:54 AM
Re: how to email multiple attachments?
Within the body of your email add this:
------------------------------------
This is my text. How are you?
[include /tmp/myattach application/octet-stream base64]
This is some more text in the middle.
[include /tmp/myexcel.xls application/ms-excel base64]
This is a closing message in the email.
----------------------------------------
That will attach the files "/tmp/myattach" and "/tmp/myexcel.xls" with the text of your message. If the above textfile were /tmp/my.text then you would do this:
cat /tmp/my.txt | elm -s "My Subject" mickeymouse@disney.com
to send your message along the the two files as attachments.