[TYPO3-core] RFC: Feature #14098: When sending mail, use TYPO3_CONF_VAR for default from address if no other address is provided

Dmitry Dulepov dmitry.dulepov at gmail.com
Wed Apr 14 09:48:05 CEST 2010


Hi!

Jeff Segars wrote:
> Solution:
> Now that we have t3lib_utility_mail, there's a central location for mail
> sending and we can modify the mail headers to use this default address
> if a from address has not already been specified.

This line is not ok:

+		if (!preg_match('/^From:/', $additionalHeaders) &&

It does not work with this $additionaHeaders:

	$additionaHeaders = 'Organization: MyCompany' . chr(10) .
		'From: me at me.com';

And does not work with this:
	$additionaHeaders = 'from: me at me.com';

Better would be:

+		if (!preg_match('/^From:/im', $additionalHeaders) &&

-- 
Dmitry Dulepov
TYPO3 expert / TYPO3 security team member
Read more @ http://dmitry-dulepov.com/


More information about the TYPO3-team-core mailing list