- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Send Mail Mesage from UNIX with multiple "Attachm...
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
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
тАО03-02-2004 02:45 AM
тАО03-02-2004 02:45 AM
I have for one file, no mail text:
"uuencode /var/adm/somelog log.txt|mailx -s user@add.com"
But the mail client, received the uuencoded attachment data instead of the attachment itself (mail client settings or sendmail settings?).
So 2 Questions:
1. How to send e-mail with message text and multiple attachments
2. How to fix the problem wherein the mail cient (Outlook so far tested) does not interpret the attachment but displays the uuencoded file.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2004 02:58 AM
тАО03-02-2004 02:58 AM
Re: Send Mail Mesage from UNIX with multiple "Attachments"
Elm will work just fine from the command line and it's quite easy. I have scripts that use it that are run everyday.
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.
I hope you are feeling well.
[include /tmp/myexcel.xls application/ms-excel base64]
This is a closing message in the email.
----------------------------------------
That will attach /tmp/myattach and /tmp/myexcel.xls. You can include multiple attachments using this method. If you are running 10.20 make sure that you have a MIME enabled version of elm (PHNE_15835 or later).
Then to use it from a script:
elm -s "My Subject" user@mailserver.com < myletter
Where myletter contains the attachment include statement as well as your message text. It is also necessary that you have a .elm directory
under the senders home directory because unlike the interactive version of elm the command-line version will not create a .elm directory automatically.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2004 03:00 AM
тАО03-02-2004 03:00 AM
Re: Send Mail Mesage from UNIX with multiple "Attachments"
I would use something like this
rm -f attach
for file in file1 file2 file3
do
uuencode $file ${file} >> attach
done
mailx -s "multiple attaches" user@add.com < attach
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2004 05:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2004 05:18 AM
тАО03-02-2004 05:18 AM
Re: Send Mail Mesage from UNIX with multiple "Attachments"
mailx -m -s "Hello" dlamar@gottschalks.com << END
`ux2dos /home/dlamar/.kshrc | uuencode /home/dlamar/.kshrc.txt`
`ux2dos /home/dlamar/.profile | uuencode /home/dlamar/.profile.txt`
This is all you get.
END
Again, best regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2004 05:21 AM
тАО03-02-2004 05:21 AM
Re: Send Mail Mesage from UNIX with multiple "Attachments"
The modification to get it to do multiples is trivial, though you will have to modify the input parameters and adjust the subject word collector to accommodate multiple attachment directives.
Simply put, you tell this script who the mail is from who it is to and what the attachment name an subject is and you're done,it gets the attachment out the door.
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
тАО03-02-2004 05:22 AM
тАО03-02-2004 05:22 AM