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

Susanne Moog typo3 at susannemoog.de
Thu Apr 15 19:22:47 CEST 2010


Hi,

On 14.04.2010 17:22, Jeff Segars wrote:
> 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.

+1 by reading and testing (with default form element). Is there any
reason, that v2 hasn't got the config_default part from v1?

Best regards,

Susanne


More information about the TYPO3-team-core mailing list