0

I am trying to send an image through html coding

<!DOCTYPE html>
<html>
    <body>
        <style>
            body {background-color:blue}
        </style>
        <h1>hello</h1>
        <h4>hello</h4>
        <center>
            <img src="C:\Users\dubasir\Desktop\New folder\we.jpg"  width="1200" height="800">
        </center>
        <a href ="http://www.google.com"> This is a linking</a>
        <p>jfklkskflksdlfklsdmklm</p>
    </body>
</html>

how to run it unix and get the image in mail body.

dashtinejad
  • 6,193
  • 4
  • 28
  • 44

2 Answers2

0

i believe you forgot to end the image tag, this is done as follows:

<img src="path/blah.jpg" height="100" width="100"/>

that slash before you end the tag is needed to close the image tag

taran
  • 1
  • 2
0

You're using an absolute Windows file name for the image. This can't work - the receiving computer has no way to know where on the world that image is stored.

Instead, you need to attach the image to the mail. Give it a name, say we.jpg. Now you can use this HTML code to use it in the mail body:

 <img src="cid:we.jpg" />

Here us an example how the raw mail would look like: Can an HTML email body reference a file sent as an attachment (in the same email)?

Community
  • 1
  • 1
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820