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

Jeff Segars jsegars at alumni.rice.edu
Wed Apr 14 17:22:55 CEST 2010


On 4/14/10 2:48 AM, Dmitry Dulepov wrote:
> 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)&&
>

Thanks for the review Dmitry.  I mistakenly thought that the field names 
in email headers were required to be capitalized and tested the regex in 
an app that had multiline support enabled already.

Attached v2 patch.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 14098_v2.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100414/5e1ac67d/attachment.asc>


More information about the TYPO3-team-core mailing list