[Typo3-dev] htmlmail and outlook

Jan-Erik Revsbech jer at moccompany.com
Wed Mar 31 15:00:14 CEST 2004


Does anyone know if there is a problem with the htmlmail class and outlook.
If I send an HTML email with image attachments, Outlook express displays it
correctly, but Outlook does not. In outlook the images are just attachments.

It seems that outlook does not understand the reference <img
src="cid:part1.<1205f8804cf54210f002695afdf27dcd at domain.tld>"> which is
produced byt the substMediaNamesInHTML(0);



Here is the code:
**
    $mail = t3lib_div::makeInstance("t3lib_htmlmail");
    $mail->start();
    $mail->useBase64();
    $mail->subject = $header;
    $mail->from_email = "dont_reply at forbrug.dk";
    $mail->from_name = "Dont reply";
    $mail->organisation = "Forbrugernes hus";
    $mail->setRecipient($address);
    $mail->setPlain($PLAINcontent);
    if($HTMLcontent) {
      $path = "typo3conf/ext/user_fh_metaext/res/";
      $mail->extractHtmlInit($HTMLcontent,$path);
      $mail->extractMediaLinks();
      $mail->fetchHTMLMedia();
      $mail->extractHyperLinks();
      $mail->substHREFsInHTML();
      $mail->substMediaNamesInHTML(0);
      $mail->setHTML($mail->encodeMsg($mail->theParts["html"]["content"]));
    }

    $mail->setHeaders();
    $mail->setContent();
    $mail->sendTheMail();
**

Hope someone can help me with this, as I will otherwise have to use another
mailsending class (like htmlMimeMail which works)

/Jan-Erik






More information about the TYPO3-dev mailing list