Fixed bug #17531: htmlMail - Can't send mails on port based systems with Swiftmailer...
authorsgalinsk <sgalinsk@709f56b5-9817-0410-a4d7-c38de5d9e867>
Tue, 22 Feb 2011 22:27:33 +0000 (22:27 +0000)
committersgalinsk <sgalinsk@709f56b5-9817-0410-a4d7-c38de5d9e867>
Tue, 22 Feb 2011 22:27:33 +0000 (22:27 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10559 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_htmlmail.php

index a0c89a8..130de0f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
 2011-02-22  Stefan Galinski  <stefan.galinski@gmail.com>
 
        * Fixed bug #17483: GifBuilder - meaningfulTempFilePrefix can cause invalid image urls
+       * Fixed bug #17531: htmlMail - Can't send mails on port based systems with Swiftmailer substitution
 
 2011-02-22  Christian Kuhn  <lolli@schwarzbu.ch>
 
index e07aa71..799188a 100644 (file)
@@ -265,8 +265,10 @@ class t3lib_htmlmail {
                if (!$host || $host == '127.0.0.1' || $host == 'localhost' || $host == 'localhost.localdomain') {
                        $host = ($TYPO3_CONF_VARS['SYS']['sitename'] ? preg_replace('/[^A-Za-z0-9_\-]/', '_', $TYPO3_CONF_VARS['SYS']['sitename']) : 'localhost') . '.TYPO3';
                }
-               $this->messageid = md5(microtime()) . '@' . $host;
 
+               $idLeft = time() . '.' . uniqid();
+               $idRight = !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'swift.generated';
+               $this->messageid = $idLeft . '@' . $idRight;
 
                        // Default line break for Unix systems.
                $this->linebreak = LF;