[Typo3] direct mail: how to not embed images?

Chris Paige chris at ready-set-go.biz
Mon Aug 15 01:44:00 CEST 2005


Someone wrote to me asking how this effort turned out...

I did write to Jan-Erik who indicated that he thought there was no built in 
flag to disable embedded images.  But he suggested I look at 
t3lib/class.t3lib_htmlmail.php.  So I hacked around a bit until I found 
something that disabled the embed.  There may be a better way, but this is 
what I was able to find.  FYI This method still embeds CSS stylesheets, 
which are handled in a seperate part of the function in question.  I was 
happy about that.

Since I have direct_mail installed globally, I had to work with 
typo3/t3lib/class.t3lib_htmlmail.php (t3lib/class.t3lib_htmlmail.php wasn't 
getting me anywhere!).

I found this function: extractMediaLinks()

This line:  $attribRegex = 
$this->tag_regex(Array("img","table","td","tr","body","iframe","script","input","embed"));

I replaced that line with:  $attribRegex = 
$this->tag_regex(Array("nonexistenttaggg"));

It's just a hack and will be overwritten if you update the extension via 
TER.  I would be glad to hear if there is a better way...

I hope this helps someone!

Chris 





More information about the TYPO3-english mailing list