Jump to content

[SOLVED] can't view image in email


contra10

Recommended Posts

im testing out my email but i can't view the image in the email, everything else shows

 

<?php
$to = ($email);
$subject = "Event Updates In Your city";
//create a boundary string. It must be unique 
//so we use the MD5 algorithm to generate a random hash
$random_hash = md5(date('r', time()));
$from = "[email protected]";
$headers = "From: $from";
//add boundary string and mime type specification
$headers .= "\r\nContent-Type: multipart/alternative; boundary=\"PHP-alt-".$random_hash."\""; 
//define the body of the message.
ob_start(); //Turn on output buffering
?>

--PHP-alt-<?php echo $random_hash; ?>  
Content-Type: text/html; charset="iso-8859-1" 
Content-Transfer-Encoding: 7bit



<table bgcolor="#3366FF">

<tr><td>
[b]<img src="eventimg.png">[/b]
<h2>The Latest  for <?php echo "$city"; ?></h2><br>
...

 

the image is in the folder and the file path is correct

Link to comment
https://forums.phpfreaks.com/topic/148429-solved-cant-view-image-in-email/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.