[Typo3-dev] Html mail class and RFC 2111 Standard

Martin T. Kutschker Martin.T.Kutschker at blackbox.net
Thu Apr 1 20:49:10 CEST 2004


Jan-Erik Revsbech wrote:
> I still have some problems with the class.t3lib_htmlmail class and some outlook email clients (although not all versions of outlook. Strange...) Anyway I looked up the standard for MIME messages containg HTML with embedded images. And typo3 does something wrong:
> 
> 
> The RFC 2111 specifies that Message ids and Conent ids should be displayed as (See for instance: http://www.mhonarc.org/~ehood/MIME/rfc2111.txt)
> 
> Content-ID: SOMESTRING at DOMAIN.ORG
> 
> And in the HTML part the <img> tag should then read
> 
> <img src="cid:UNIQUESTRING at DOMAIN.ORG">
> 
> The class.t3lib_htmlmail class does this:
> 
> Content-id: <partNN.<THE_MESSAGE_ID>>
> 
> And then sets the HTML tags to <img src="cid:partNN.<THE_MESSAGE_ID>" />

Really? Indeed looks odd and should definitly not be like this.

> The fix is simple requres only two subsitutions in the class:
> 
> -In function start:
> 
> Replace:   $this->messageid = '<'.md5(microtime()).'@domain.tld>';
> with:    $this->messageid = md5(microtime()).'@domain.tld';
> 
> - In function setHeader()
> Substitue   $this->add_header("Message-ID: $this->messageid);
> 
> with   $this->add_header("Message-ID: <".$this->messageid.">");

Sounds reasonable.

Masi





More information about the TYPO3-dev mailing list