Operating System - HP-UX
1827636 Members
3434 Online
109966 Solutions
New Discussion

Image file in content while sending mail from unix

 
SOLVED
Go to solution
MAYIANAN
Advisor

Image file in content while sending mail from unix

Hi frns, i just need to send a jpg file along with some text as an email from shell script. Is there any way to do this.
4 REPLIES 4
Jeeshan
Honored Contributor
Solution

Re: Image file in content while sending mail from unix

Hi

Here is a sample script

#!/usr/bin/sh
mailx -m -s "Stuff..." whoever@somewhere.com << END
$(ux2dos | uuencode )
a warrior never quits
MAYIANAN
Advisor

Re: Image file in content while sending mail from unix

hi ahsan,

Thx for your reply. I have some doubts in it.

$(ux2dos | uuencode )

in the above line both the filename are jpg files right and will this go as a content in a mail and not attachment.

Since it will take some 2days for me to get access to unix box i could not able to test it out.
Dennis Handly
Acclaimed Contributor

Re: Image file in content while sending mail from unix

>in the above line both the filename are jpg files right and will this go as a content in a mail and not attachment.

Right as content. For attachments:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1235413
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1208361
MAYIANAN
Advisor

Re: Image file in content while sending mail from unix

Followed arshan solution and it worked