Embedding JPEG image to the body file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Embedding JPEG image to the body file
# 1  
Old 06-29-2015
Embedding JPEG image to the body file

hi,

I am trying to embed an image to the body of the email, but the image is not visible.
HTML Code:
echo "<html>
    <body>
        <style>
            body {background-color:blue}
        </style>
        <h1>hello</h1>
        <center>
            <img src="/home/hp01-thumb-ironman-1929584.jpg"  align="right" >
        </center>
        <p>jfklkskflksdlfklsdmklm</p>
    </body>
</html>" > EMAIL_CONTENT_1.tmp

(echo "Content-Type: text/html"; echo "From: Test@.com";echo "To: xx@abc.com";echo "Subject: Test"; 
cat EMAIL_CONTENT_1.tmp)| sendmail xx@abc.com

Last edited by ATWC; 06-29-2015 at 04:10 PM..
# 2  
Old 06-29-2015
Code:
src="/home/hp01-thumb-ironman-1929584.jpg"

That image is hosted locally and not accessible outside the local system.
If you want to embed it so the recipient sees it, you must host the picture in a public accessible server.
Code:
src="http://server/path/to/hp01-thumb-ironman-1929584.jpg"

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Difficulty to send image in mail body.

I have jpg file in my server. I am facing difficulty while sending the image in body . appreciate your help to fix to below code. echo "--FILEBOUNDARY" echo "Content-Type: image/jpg" echo "Content-Disposition: inline; filename=\"tick.jpg\"" echo... (3 Replies)
Discussion started by: Jewel
3 Replies

2. UNIX for Dummies Questions & Answers

Mutt command - email body with out file name

Hello All, I know we can put body inside a mail using -i option for specifying the file which contains body message, is there an option for me to specify body content instead of a file specification only using mutt? Below is not working and i don't see any options in manual page! ... (4 Replies)
Discussion started by: Ariean
4 Replies

3. Shell Programming and Scripting

Emailing html file as body not attachment

Hi All, I want to send the html file as message body not as an attachment. below is my code.it is printing the html code as it is in the email. your help is needed urgently. VTIER=$ROOTHOME/vtierlist2.txt genhtml=/$ROOTHOME/genhtml.html MAILTO=/$ROOTHOME/maillist SUBJECT="Vtier Usage... (6 Replies)
Discussion started by: amitbisht9
6 Replies

4. Shell Programming and Scripting

cp RAW files if JPEG file present

hi guys and girls, i have a folder containing RAW and JPG images. eg... 001.jpg 003.jpg 005.jpg 001.raw 002.raw 003.raw 004.raw 005.raw I want to copy only RAW files that have a corresponding JPG file in to a new folder. the jpg files do not need to be copied. in this example i... (6 Replies)
Discussion started by: fxylxy
6 Replies

5. UNIX Desktop Questions & Answers

Embedding file output into a script

Hello. I found a Unix script on this site that calculates a date that is 2 months earlier from today. I'm using that script and writing the value to a file called 2monthsago.txt. I want to use that value in another script. Below is my attempt at doing that and the results. My Script: ... (1 Reply)
Discussion started by: Colel2
1 Replies

6. Shell Programming and Scripting

Embedding a command with SSH

Hi I am trying to run a script centrally that will go out and set the network management ip address on all my Sun boxes running Solaris. We have decided that the network management address will be the boxes main IP address but the first octet as a 172 rather than a 10, so for example ifconfig -a... (2 Replies)
Discussion started by: hcclnoodles
2 Replies

7. UNIX for Dummies Questions & Answers

Mailx : can we have the body to be a binary file ?

Hi I am totally dummy as far as UNIX is concerned, so please apologize. I was just given the syntax to send multiple attachments with a body.txt message, it works great and we use it a lot. Now, my question is : can we have the body to be a Binary file (like a Word Document for example)? ... (5 Replies)
Discussion started by: CKIRCH
5 Replies

8. Programming

Embedding xnest in C code

I hope I am posting this in the right section. I have c file that is using the motif GUI toolkit to draw widgets and things of that sort. I also have another program that runs with xnest. I need to figure out a way to place that xnest program in my c code so that it exists in the window that the... (4 Replies)
Discussion started by: lesnaubr
4 Replies

9. UNIX for Advanced & Expert Users

Create an Ignite image on tape from Online IgniteUX image

Hi, (HP-UX 11.11) I need to create a tape image of an igniteUX image created on our igniteUX server. That is to say. I have a "Online" image of the igniteUX of the targeted system but I now need to copy it to a useable TAPE (igniteUX) image so i can build an other server from it that is not... (3 Replies)
Discussion started by: Andrek
3 Replies

10. UNIX for Dummies Questions & Answers

does any body know how to unpack this file?????

this file i'm trying to unpack is a cloop file (1 Reply)
Discussion started by: amicrawler2000
1 Replies
Login or Register to Ask a Question