PHPmailer Problem

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • PHPmailer Problem

    Hallo, ich verwende den PHP Mailer, funzt auch einwandfrei. nur wenn ich probiere hiermit ein Bild in eine HTML Mail einzubetten funzt es nicht:

    PHP-Code:
    $mail->AddEmbeddedImage('banner_email.jpg','banner_email','banner_email.jpg');
    $mail->Body  =  "<img src='cid:banner_email'>"
    das Bild wird zwar angehängt, aber ich bekomme ein rotes kreuz wo es angezeigt werden soll, also der img tag funzt nicht. kann mir jemand helfen??

  • #2
    Die Datei 'banner_email.jpg' existiert und liegt im selben Verzeichnis wie das Script?

    Gruß
    Uwe

    Kommentar


    • #3
      ja, sie wird ja auch an die email angehängt.... nur halt nicht dargestellt...

      Kommentar


      • #4
        setze den typ der datei auf "image/jpeg".
        steht doch auch in der doku.

        Kommentar


        • #5
          wo setze ich den Typ? Das hier steht in der Doku
          There is an additional way to add an attachment. If you want to make a HTML-message with Images, you have to make an attachment of the image and then link the <img src="cid:CID" /> tag to it. This is done with a so called CID. For example, you add an image as Inline Attachment with the CID my-photo, you access it within the HTML-mail Part with &ltimg src="cid:my-photo" alt="my photo" />. It's that easy!

          Here is the function to add the Inline Attachment in detail:
          $mail->AddEmbeddedImage(filename, cid, name));
          By using this function with this example's value above, leads into this code:
          $mail->AddEmbeddedImage('my-photo.jpg', 'my-photo', 'my-photo.jpg '));
          steht nix von dateityp?!?

          Kommentar


          • #6
            http://phpmailer.sourceforge.net/doc...dEmbeddedImage

            Kommentar


            • #7
              sry wenn ich mich etwas blöd anstelle, aber hab das jetzt so verändert:

              PHP-Code:
              $mail->AddEmbeddedImage('banner_email.jpg','banner_email','banner_email.jpg','base64','image/jpeg'); 
              gleiches Problem wie voher!

              Kommentar


              • #8
                kann keiner helfen? also den Dateityp habe ich doch jetzt richtig angegeben, oder? und das Bild wird ja auch angehängt, also kan nes daran auch nicht liegen. Nur wird es halt nicht angezeigt, muss irgendwie an der cid liegen!

                //EDIT:
                Hab gerad rausgefunden das es mit Outlook geht! Thunderird zeigt das Bild nicht an, auch Web.de zeigt es nicht! Normal?
                Zuletzt geändert von Simon6785; 05.10.2005, 11:17.

                Kommentar


                • #9
                  Ist denn 'banner_email' eine gültige CID?
                  Versuch's mal mit einer ohne Sonderzeichen wie den Unterstrich, einfach mal nur banneremail oder bEmail.
                  I don't believe in rebirth. Actually, I never did in my whole lives.

                  Kommentar


                  • #10
                    ne, daran lags nicht, mit der cid banner gehts auch nicht

                    Kommentar

                    Lädt...
                    X