Operating System - HP-UX
1833588 Members
3727 Online
110061 Solutions
New Discussion

Re: sending mail to outlook but attachment is part of the mail body

 
SOLVED
Go to solution
Ian Lochray
Respected Contributor

sending mail to outlook but attachment is part of the mail body

I want to send a plain text file from HP-UX to MS Outlook as an attachment. I have tried all the methods I can find in all the different threads ( uuencode, include, < filename ) with elm, mailx and sendmail. The file contents do get to Outlook but my problem is that they are embedded in the mail body and are not a seperate attachment. If I try to email a pdf file it does appear as an attachment but plain text files do not.
5 REPLIES 5
Radu Swider_1
Occasional Contributor

Re: sending mail to outlook but attachment is part of the mail body

i know this, but you can send attachments following this `procedure`:

gzip -c file_to_compress | uuencode compressed_file >> ./message_to_send

echo "The body of the message" >> ./message_to_send

mailx -s "Subject of the message" xx@yy.zz < message_to_send

at the end, if you want to clean the message_to_send type cat /de/null > ./message_to_send
Ian Lochray
Respected Contributor

Re: sending mail to outlook but attachment is part of the mail body

I tried this without success.
I have a file "ilfile" whch contains 3 lines. I do ...
gzip -c ilfile | uuencode ilfile.Z >> ilfile.send
echo "This is the body" >> ilfile.send
mailx -s "This is the subject" ian@ssi-world.com < ilfile.send
In MS outlook, I get a message (no attachment) with the text
begin 666 ilfile.Z
G'XL("-)O73L``VEL9FEL90!+3$SD2DI*XDI.3N8"`#3Z'[X,````
`
end
This is the message body
Rita C Workman
Honored Contributor
Solution

Re: sending mail to outlook but attachment is part of the mail body

 
Radu Swider_1
Occasional Contributor

Re: sending mail to outlook but attachment is part of the mail body

my script witch send mails with attachments works very well with outlook express...but the output of the gzip have .gz extension....nothing with .Z !!!
I will send you again my script...
Maybe is something about the path (try absolute path)

gzip -c a.txt | uuencode a.gz >> ./to_send
echo "Body" >> ./to_send
mailx -s "Subject" aa@bb.cc < ./to_send

good luck
Ian Lochray
Respected Contributor

Re: sending mail to outlook but attachment is part of the mail body

Thanks for your help. It now works beautifully.