PHP EMAIL No painting



  • I'm trying to e-mail a letter with HTML-smart and a picture that is generated by PHP-scream. But the recipient comes a letter without a picture. My letter looks like,

    <p>Какой-нибудь текст...</p>
    <p>Картинка:</p>
    <p><img src="http://mysite.com/img.php"></p>
    <p>Какой-нибудь текст...</p>
    

    In img.php this code:

    $image = imagecreatetruecolor(50, 100);
    imagefill($image, 0, 0, 0x555555);
    header('Content-type: image/png');
    imagepng($image);
    imagedestroy($image);
    

    If a reference is made mysite.com/img.phpthe picture is correct. The letter itself Content-Type: text/html♪ The pupil comes a letter, not even in the spam, the text is correct, but instead of the picture, it's empty, and Firebug reports that the real size of the picture is 1x1 px, even though I ask a different size. But if I'm sending a picture not from the php scrupt, it's just from the server. <img src="http://mysite.com/img1.png">the recipient's got it. But I need to send a generated picture. What am I doing wrong?



  • It should be pointed out that the first part of the reference is the http sirer. Accordingly, reference should be made to the scheme (http: or https:) e.g. http://mysite.com/img.php

    Spread the situation. The violin that generates the picture is yours. I write the following letter:

    <html>
      <head>
        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      </head>
      <body text="#000000" bgcolor="#FFFFFF">
        <img alt="" src="http://froloff.su/test1.php" width="23" height="23">
        <br>
        <img alt="" src="//froloff.su/test1.php" width="23" height="23">
        <br>
        <img alt="" src="froloff.su/test1.php" width="23" height="23">
        <br>
        Test images
      </body>
    </html>
    

    The third picture of Yandex took out the atribut. src♪ The others are showing up. The picture is produced with a 50x100 dimension, and is towed by the Yandex in its original amount.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2