Operating System - HP-UX
1832282 Members
1956 Online
110041 Solutions
New Discussion

how to attach files on sendmail -v

 
SOLVED
Go to solution
Roberto Gallis
Regular Advisor

how to attach files on sendmail -v

Hi all,
does anybody know how to attach files using sendmail -v command?


regards

Roberto
4 REPLIES 4
Alex Glennie
Honored Contributor
Solution

Re: how to attach files on sendmail -v

he following command will send the file hosts.sh which is actually /etc/hosts
on this server as an attachment via sendmail:

uuencode /etc/hosts hosts.sh | sendmail root@abc.atl.hp.com

Additional information:

1. If the encoded file is a .txt file it will not be displayed as an attachment
when using Netscape mail. It will appear as part of the original document.

2. The received file will not be formatted correctly when read with Notepad;
but is correctly formatted when read with Word.

3. The file can be read with Notepad if you use the ux2dos command
first.
Example:

ux2dos /etc/hosts > /tmp/hosts
uuencode /tmp/hosts hosts.txt | sendmail -v
root@abc.atl.hp.com

rm /tmp/hosts # deletes the extra file that was generated.

If this method is used, there will be no TO or SUBJECT lines in the header
when read from Netscape mail.


Another method that will cause the SUBJECT and the TO and FROM addresses to
appear in the e-mail is:

(
echo "From: SENDER_NAME
echo "To: RECIPIENT_NAME "
echo "Subject: THE_SUBJECT"
# Text can be inserted here using echo command(s)
uuencode /etc/hosts hosts.sh
) | sendmail user@abc.com

Sender will have to supply the SENDER_NAME, RECIPIENT_NAME, and THE_SUBJECT
MARTINACHE
Respected Contributor

Re: how to attach files on sendmail -v

Hi,

You can use mpack, a very good tool :

http://hpux.cs.utah.edu/hppd/hpux/Users/mpack-1.5/

You can attach what you want !

Regards,

Patrice.
Patrice MARTINACHE
Rita C Workman
Honored Contributor

Re: how to attach files on sendmail -v

And in this thread is another way to do this....

http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0x41950559ff7cd4118fef0090279cd0f9!0,00.html

'cause we all need more options
Regards,
/rcw
Roberto Gallis
Regular Advisor

Re: how to attach files on sendmail -v

Thank you all,

best regards

Roberto