- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Sendmail with 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-15-2001 05:48 PM
тАО02-15-2001 05:48 PM
Anyone has any idea how to use a command line to send a mail with attachment (plain text file, eg, test.txt) using sendmail ?
I actually intend to write a program so that it will generate a text file and automatically send it out using sendmail.
The sendmail patch I have is
PHNE_17190 1.0 sendmail(1m) 8.8.6 patch
Please help ! I have someone telling me to use uuencode command then pipe to sendmail. Prior to that have to use the ux2dos as well. Tried already but still receive garbage. Can't see the text file attachment at all.
Please help !!!!
Thanks !
Regards,
Shirley
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2001 06:19 PM
тАО02-15-2001 06:19 PM
Re: Sendmail with attachment?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2001 10:15 PM
тАО02-15-2001 10:15 PM
Re: Sendmail with attachment?
Thanks for your help. Your command does work on some mail clients, but some displayed garbage when I tested using the same text file for attachment.
But anyway, do you have any idea how to append the mail with a subject? I realised that the recipient received the mail without a subject.
Thanks !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2001 10:49 PM
тАО02-15-2001 10:49 PM
Re: Sendmail with attachment?
The mail will show garbage only, you need to save it as file_to_send.mail and execute cmd:
uudecode file_to_send.mail
Then u can see actual text.
If u want to send it with subject:
uuencode file_to_send encoded_file | mailx -s "subject" friend
Hope this may helps you
Cheers....
Satish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2001 10:53 PM
тАО02-15-2001 10:53 PM
Re: Sendmail with attachment?
You need to save the mail with .mail extension and execute uudecode command.
Cheers...
Satish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2001 11:33 PM
тАО02-15-2001 11:33 PM
Re: Sendmail with attachment?
Thanks for your help. But what's the difference when I use sendmail and mailx to send my email?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2001 08:38 AM
тАО02-16-2001 08:38 AM
Re: Sendmail with attachment?
http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x41950559ff7cd4118fef0090279cd0f9!0,00.html
As with all in UNIX...there's always more options,
/rcw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2001 07:57 PM
тАО02-16-2001 07:57 PM
Re: Sendmail with attachment?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2001 09:27 PM
тАО02-16-2001 09:27 PM
SolutionFrom man pages of sendmail:
" sendmail sends a message to one or more recipients, routing the message over whatever networks are necessary. sendmail does internetwork forwarding as necessary to deliver the message to the correct place.
sendmail is not intended as a user interface routine; other programs provide user-friendly front ends; sendmail is used only to deliver pre-formatted messages.
..................................
.................................."
Means it depends on whether you are sending mail within network or internetwork and also whether it is pre-formatted or not.
And as far as I know you cannot attach subject with sendmail.
You can use:
mailx -s"subject" friend < test.txt
Hope this helps you...
Cheers....
satish.