ecard mail function won't display image

Hi. I’m a self taught developer, learned php on an as-needed basis so don’t have knowledge of how servers communicate. My ecard code seems to work well except the card image doesn’t display in the recipient’s email. A suggestion from another forum was to save the image file to the server, then use the path in the mail function. My image files are already on my host’s server, so I’m not sure why I’d need to do that (and couldn’t figure out how if I did). Here is part of the program. (I used sessions to load values from previous pages, including the image file name. var_dump showed the value to be correct in each case, e.g. fileName.jpg. I later added the specific path to the host server, but it still didn’t work).

$to = ‘To: ’ . $_SESSION[‘rEmail’];
$subject = $_SESSION[‘sFirstName’] . ’ ’ . $_SESSION[‘sLastName’] . ’ has sent you a Kieferart eCard!’;
$message ="Kieferart Ecards\n

\n #ecardImage {position:absolute; top:175; left:325}\n #ecardSalutation {position:absolute; top:360; left:330; font-family:Arial; text-align:left; color:black; font-size:9pt; font-weight:normal}\n #ecardMessage {position:absolute; top:370; left:330; font-family:Arial; text-align:left; color:black; width:600; font-size:9pt; font-weight:normal}\n #ecardClosing {position:absolute; top:670; left:315; font-family:Arial; text-align:left; color:black; font-size:9pt; font-weight:normal}\n \n
\n " . $altName . "\n
" . $_SESSION['salutation'] . "
" . $_SESSION['comments'] . "\n
" . $_SESSION['closing'] . "
\n"; $message = wordwrap($message, 70); $headers = "From: " . $_SESSION['sEmail'] . "\r\n"; $headers .= 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; mail($to, $subject, $message, $headers); ?>

I’d really appreciate some patient person to walk me through the error of my ways.

Thank you,

Sponsor our Newsletter | Privacy Policy | Terms of Service