embeded image in an email script not working

Discussion in 'PHP' started by alimoses, Nov 28, 2011.

  1. #1
    I wrote a script to send an email and display an image in body of the email as a logo. The email is sent but the image does not display. I have a folder named images where I stored the image named logo.jpg

    $to = 'alimoses2003@yahoo.com';
    $from = 'jounal@e3journals.org';
    $headers = $from;
    $subject = 'Invitation to Review : [' . $manuscriptCode .']';
    $message = ' <html> ';
    $message .= '<div align="right"><img src="http://www.e3journals.org/images/logo.jpg"></div>';
    $message .= '<div align="center"><b>'.$subject.'</b></div><br>';
    $message .='Dear '.$reviewerName.',<br><br>';
    $message .='We wish to inquire if you could create time to review the manuscript titled:<br><br>';
    $message .= '<b>Review of '.$_POST['articleTitle'].'</b><br><br>';

    $ok = @mail($to, $subject, $message, $headers);

    Please someone should help me look it up
     
    alimoses, Nov 28, 2011 IP
  2. Shiplu

    Shiplu Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Clients like gmail will turn off the image by default. You can not show them.

    Did you try multipart html? It should work. But I didn't test it.
     
    Shiplu, Nov 28, 2011 IP
  3. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #3
    Whether an individual recipient sees the picture is determined by how that recipient has his email client set up. You can't control it. That's why the best solution is to include anything that's not pure text as an attachment.
     
    Rukbat, Dec 1, 2011 IP