- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Attach a file in mail
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
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
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-28-2002 07:36 AM
02-28-2002 07:36 AM
Attach a file in mail
I have to send a PDF file via sendmail or mailx utility
How can I do that?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2002 07:38 AM
02-28-2002 07:38 AM
Re: Attach a file in mail
* ux2dos
* ux2dos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2002 07:39 AM
02-28-2002 07:39 AM
Re: Attach a file in mail
It's important to "tag" the uuencoded file as a type PDF so your mail program can read it.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2002 07:41 AM
02-28-2002 07:41 AM
Re: Attach a file in mail
And to send Mulitple PDF's in an email:
for i in `echo filename1 filename2 filename3 ...`
do
uuencode $i $i.pdf
done|mailx -m -s "test" username@whereever.com
if the filename already has PDF at the end, then drop the ".pdf" after the second $i in the loop.
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2002 07:41 AM
02-28-2002 07:41 AM
Re: Attach a file in mail
Check this thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x19e3ff77de2bd611abd50090277a778c,00.html
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2002 07:48 AM
02-28-2002 07:48 AM
Re: Attach a file in mail
Here's a simple script using sendmail:
=======================================
#!/bin/ksh
if [ $# -ne 3 ] ; then
echo
echo Syntax error: $0 file subject recipient
echo
exit 1
fi
file=$1
subject=$2
recipient=$3
(echo "Subject: $2
Please find file $1 attached";
uuencode $file ${file}.pdf) | /usr/lib/sendmail $recipient
=====================================
this sorts out the Subject, which sendmail expects to start "Subject: " followed by a blank line. It also forces a ".pdf" suffix to the attachment. If your original file already has that as a suffix, then you don't need it.
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2002 11:25 AM
02-28-2002 11:25 AM
Re: Attach a file in mail
it's working!
Frankly, I did not expect such generous help.
Thank you again!
Alex