Operating System - HP-UX
1834403 Members
2969 Online
110067 Solutions
New Discussion

Re: FILES ATTACHED WITH BODY INTO THE MAIL ..

 
SOLVED
Go to solution
Manuales
Super Advisor

FILES ATTACHED WITH BODY INTO THE MAIL ..

This did not work:

ux2dos /path_to/some_file | uuencode some_file.txt | mailx -m -s "MAIL FROM Someone" someone@somewhere.com <
file_for_email_body

it works but with no attached file :(
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: FILES ATTACHED WITH BODY INTO THE MAIL ..

I use sendmail to do this.

ux2dos /path_to/some_file | uuencode some_file.txt | sendmail someone@somewhere.com
Manuales
Super Advisor

Re: FILES ATTACHED WITH BODY INTO THE MAIL ..

but i need to send an attached file and also i have to writte into email body ....

how can i do that???
Manuales
Super Advisor

Re: FILES ATTACHED WITH BODY INTO THE MAIL ..

does somebody know about it ... ??
Yogeeraj_1
Honored Contributor
Solution

Re: FILES ATTACHED WITH BODY INTO THE MAIL ..

hi,

can you try the solution that i have provided in your other thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1130874



export emailadd="someone@somewhere.com"
export subject="MAIL FROM Someone"
export convertedFile="/tmp/some_file.txt"
export sourceFile="/path_to/some_file"

/usr/bin/ux2dos $sourceFile > $convertedFile

/usr/bin/uuencode $covertedFile "some_file.txt"|mailx -m -s "$subject" $emailadd1




kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
VK2COT
Honored Contributor

Re: FILES ATTACHED WITH BODY INTO THE MAIL ..

Hello,

Do not waste time on Mail Transfer Agent
(sendmail is one of them). I know
sendmail well as I have been managing
and designig it for the last 22 years
(along with other mainstream MTAs like
Exim, Postfix, Smail, and Qmail).

There are much better tools.

Mutt is one of them. I just installed
it for a customer who wanted to
receive Measureware reports as Excel
attachments via email. Works beautifully.

You can find Mutt at the HP Porting and
Archiving Centre:

http://hpux.cs.utah.edu/

Note that it requires a couple of
addionional packages (look for
run-time dependencies).

Best wishes,

VK2COT
VK2COT - Dusan Baljevic
Dennis Handly
Acclaimed Contributor

Re: FILES ATTACHED WITH BODY INTO THE MAIL ..

Your command line above is telling mailx to take the stdin from a pipe and again stdin from the redirected file. You can't do both.

You will have to combine them as Yogeeraj suggests.