Project

General

Profile

Bug #90040

Updated by Sven Nußbaum over 4 years ago

<pre> 
   /typo3/sysext/core/Classes/Mail/Mailer.php:108 
 </pre> 
 <pre><code class="php"> 
 $replyTo = MailUtility::getSystemReplyTo(); 
 ... 
 $replyTo = new Address(reset($replyTo), $address); 
 </code></pre> 

 Line 108 is setting "@new Address@" "new Address" as replyTo using the value of the array as address and $address as name. 

 Issue: 
 The array returned from @MailUtility::getSystemReplyTo()@ MailUtility::getSystemReplyTo() is different depending on @defaultMailReplyToName@ defaultMailReplyToName is being set in @$GLOBALS['TYPO3_CONF_VARS']['MAIL']@. $GLOBALS['TYPO3_CONF_VARS']['MAIL']. 
 When set, address is key and name is value. When not set address is value. 

 <pre><code class="php"> 
         if (!empty($mailConfiguration['defaultMailReplyToName'])) { 
             $replyTo = [$replyToAddress => $mailConfiguration['defaultMailReplyToName']]; 
         } else { 
             $replyTo = [$replyToAddress]; 
         } 
 </code></pre> 


 @reset($replyTo)@ reset($replyTo) therefore returns the name when @defaultMailReplyToName@ defaultMailReplyToName is filled leading to invalid RFC validation and exception when sending mail: 

 <pre><code class="text"> 
 RFC compliance problem 
 Please verify $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] is a valid mail address. Error message: Email "ACME" does not comply with addr-spec of RFC 2822. 
 </code></pre> 




Back