- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Send attachments using sendmail.
Operating System - HP-UX
1822320
Members
6171
Online
109642
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
Forums
Discussions
юдл
back
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
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-28-2008 10:11 PM
тАО02-28-2008 10:11 PM
Send attachments using sendmail.
Hi,
I have a written a shell script to
send e-mails using multiple attachments ( usign uuencode). Interestingly when an
ms-excel files are sent as attachments, the format will be intact, but when a text file (files) is sent as an attachment, it will remove the format.
Kindly show some light on how this can be retained.
Note: My script is as follows.
++++++++++++++++++++++++++++++++++++++++++++++
FILE="file_rpt.txt"
echo "From: raghu@abc.com" > "MESSAGE_FILE"
echo "To: raghu@xyz.com" >> "MESSAGE_FILE"
echo "Subject: Report" >> "MESSAGE_FILE"
echo "Content-type: multipart/mixed >/dev/null
echo "" >> "MESSAGE_FILE"
echo "" >> "MESSAGE_FILE"
uuencode ${FILE} ${FILE}>>${MESSAGE_FILE}
cat MESSAGE_FILE|/usr/sbin/sendmail -t
++++++++++++++++++++++++++++++++++++++++++++++
Or is it possible to use any other method in sendmail header.
Many Thanks,
Regards,
Raghu.
I have a written a shell script to
send e-mails using multiple attachments ( usign uuencode). Interestingly when an
ms-excel files are sent as attachments, the format will be intact, but when a text file (files) is sent as an attachment, it will remove the format.
Kindly show some light on how this can be retained.
Note: My script is as follows.
++++++++++++++++++++++++++++++++++++++++++++++
FILE="file_rpt.txt"
echo "From: raghu@abc.com" > "MESSAGE_FILE"
echo "To: raghu@xyz.com" >> "MESSAGE_FILE"
echo "Subject: Report" >> "MESSAGE_FILE"
echo "Content-type: multipart/mixed >/dev/null
echo "" >> "MESSAGE_FILE"
echo "" >> "MESSAGE_FILE"
uuencode ${FILE} ${FILE}>>${MESSAGE_FILE}
cat MESSAGE_FILE|/usr/sbin/sendmail -t
++++++++++++++++++++++++++++++++++++++++++++++
Or is it possible to use any other method in sendmail header.
Many Thanks,
Regards,
Raghu.
- Tags:
- attachments
- sendmail
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2008 10:34 PM
тАО02-28-2008 10:34 PM
Re: Send attachments using sendmail.
Have you considered using a real MIME
program, like, say, mpack?
A forum search for something like
e-mail attachment
may find some of the many old threads
covering this topic.
program, like, say, mpack?
A forum search for something like
e-mail attachment
may find some of the many old threads
covering this topic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-29-2008 05:28 AM
тАО02-29-2008 05:28 AM
Re: Send attachments using sendmail.
Pipe the uuencode to mailx as follows.
uuencode ${FILE} ${FILE} |
mailx -m -s "subject" email@address
Works for me on HPUX. Note take out the -m option on other flavours of unix.
uuencode ${FILE} ${FILE} |
mailx -m -s "subject" email@address
Works for me on HPUX. Note take out the -m option on other flavours of unix.
The Devil is in the detail.
- Tags:
- uuencode
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP