Index: typo3/sysext/install/mod/class.tx_install.php =================================================================== --- typo3/sysext/install/mod/class.tx_install.php (revision 3383) +++ typo3/sysext/install/mod/class.tx_install.php (working copy) @@ -1507,29 +1509,47 @@ TYPO3 is designed to use the default set of PHP4.3.0+ functions plus the functions of GDLib. Possibly these functions are disabled due to security risks and most likely the list would include a function like exec() which is use by TYPO3 to access ImageMagick. ",2); - } else $this->message($ext, 'Functions disabled: none',"",-1); - if (!ini_get('sendmail_path')) { - $this->message($ext, 'Sendmail path not defined!'," - sendmail_path=".ini_get('sendmail_path')." - This may be critical to TYPO3's use of the mail() function. Please be sure that the mail() function in your php-installation works! - ".$this->check_mail('get_form'),1); } else { - list($prg) = explode(' ',ini_get('sendmail_path')); - if (TYPO3_OS=='WIN') { - $this->message($ext, 'Sendmail program not searched for on Windows',"",1); - } else { - if (!@is_executable($prg)) { - $this->message($ext, 'Sendmail program not found or not executable?'," - sendmail_path=".ini_get('sendmail_path')." - This may be critical to TYPO3's use of the mail() function. Please be sure that the mail() function in your php-installation works! - ".$this->check_mail('get_form'),1); - } else { - $this->message($ext, 'Sendmail OK'," - sendmail_path=".ini_get('sendmail_path').' - You may check the mail() function by entering your email address here: - '.$this->check_mail('get_form'),-1); + $this->message($ext, 'Functions disabled: none',"",-1); + } + // Mail tests + if (TYPO3_OS == 'WIN') { + $smtp = ini_get('SMTP'); + if (!$smtp || $smtp == ($smtp_addr = @gethostbyname($smtp)) || !t3lib_div::testInt(ini_get('smtp_port'))) { + $this->message($ext, 'Mail configuration is not set correctly',' + Mail configuration is not setPHP mail() function requires SMTP and smtp_port to have correct values on Windows.', + 2); + } + else { + if ($smtp_addr == '127.0.0.1' && $_SERVER['SERVER_ADDR'] == '127.0.0.1') { + $this->message($ext, 'Mail is configured (potential problem exists!)', + 'SMTP=' . $smtp . ' - Note: this server! Are you sure it runs SMTP server? + smtp_port=' . ini_get('smtp_port') . ' + '.$this->check_mail('get_form'), 1); } + else { + $this->message($ext, 'Mail is configured', + 'SMTP=' . $smtp . ' + smtp_port=' . ini_get('smtp_port') . ' + '.$this->check_mail('get_form'), -1); + } } + } elseif (!ini_get('sendmail_path')) { + $this->message($ext, 'Sendmail path not defined!',' + This may be critical to TYPO3\'s use of the mail() function. Please be sure that the mail() function in your php-installation works! + ' . $this->check_mail('get_form'),1); + } else { + list($prg) = explode(' ', ini_get('sendmail_path')); + if (!@is_executable($prg)) { + $this->message($ext, 'Sendmail program not found or not executable?',' + sendmail_path=' . ini_get('sendmail_path') . ' + This may be critical to TYPO3\'s use of the mail() function. Please be sure that the mail() function in your php-installation works! + '.$this->check_mail('get_form'), 1); + } else { + $this->message($ext, 'Sendmail OK',' + sendmail_path=' . ini_get('sendmail_path') . ' + '.$this->check_mail('get_form'),-1); + } } // ***************** @@ -1624,6 +1644,7 @@ if($this->INSTALL['use_htmlmail']) { require_once (PATH_t3lib.'class.t3lib_htmlmail.php'); $emailObj = t3lib_div::makeInstance('t3lib_htmlmail'); + /* @var $emailObj t3lib_htmlmail */ $emailObj->start(); $emailObj->subject = $subject; $emailObj->from_email = 'test@test.test';