0

I want share image with gmail share in body.

$body_link = '<img src="http://www.yourdomain.com/address.png" />';
$email =  urlencode($body_link);
<a title="Google+" href="https://mail.google.com/mail/?view=cm&fs=1&tf=1&su=Refer your friend&body=<?php echo $email; ?>" target="_BLANK">gmail</a>

My gmail screen is: enter image description here

After send gmail, on my gmail screen: enter image description here

Why not getting image in mail?

And is it possible?

Vinod
  • 123
  • 1
  • 3
  • 14

1 Answers1

0

You have to insert the image as attachment and then create the email with the attachment on the body.

You can follow the Creating messages with attachments documentation and apply it to PHP.

I you send yourself an email with an image in the body and you check Show original (Next to Reply, click More and then Show original.) from that email, you can see how the image is set as an attachment.

This post can help you also: sending mail with attachment using gmail api in php

Kessy
  • 1,894
  • 1
  • 8
  • 15