How do I add a picture to an e- mail in php?

  • Thread starter Thread starter Thomas B
  • Start date Start date
T

Thomas B

Guest
I would like to add a picture to my e-mail send out program in php, but I would not like it to be an attachment. Here is the code I have written so far.


$firstName = $_REQUEST['firstName'];
$lastName = $_REQUEST['lastName'];
$phone = $_REQUEST['phone'];
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$time=(date("g:i A l F d Y"));
$string1 = ""
mail( "[email protected]", "Test",
$string1, "From: $email" );
 
What do you mean, add a picture but not as an attachment?

You can send images in only two ways in an email:

1. as attachment: the receiver will still see the image as it is without having to download it (all email clients can just show the image attachment)

2. make a html email, use an img tag (while hosting the image on a web server somewhere so that it will always be online) and point the tag to your hosted email.
 
Back
Top