0

I need to attach an image to the mail and open that mail in the mail client and I don't know how to do that. I know how to open the mail client using the code

<a href="mailto:" target="_top">
Send Mail</a> 

but how can I do the same when i click on image and send that image as an attachment?????

Optimus
  • 2,200
  • 8
  • 37
  • 71

2 Answers2

2

There is no way to do what you want. You can't open the mail client except through a mailto: link. When you do, all you can set is the "to" and "cc" addresses, subject, and body, and the body can only be text. It all has to fit in the URL.

See mailto and rfc6068.

Community
  • 1
  • 1
John Saunders
  • 160,644
  • 26
  • 247
  • 397
0

Not sure if I'm understanding exactly what it is you are trying to do. Are you saying through some other type of process you are sending out an email with the images embedded in the email itself...so you have:

<a href="mailto:" target="_top">Send Mail</a>
<a href="mailto:" target="_top"><img src="myimage.jpg"></a>

I'm sure that's probably not what you're looking for, but let me know.

Indy-Jones
  • 668
  • 1
  • 7
  • 19