Project

General

Profile

Actions

Bug #23925

closed

Mail not sent with SAFE_MODE enabled

Added by Boris Gulay over 13 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-11-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

After upgrading to branch 4 of TYPO3 (from 4.3) I found that mail from TYPO3 is not sent any more. Some of my extensions are using htmlmail and none of them is able to send messages: function sendTheMail always returns false. I'm unable to send mail even from InstallTool.

I'm using TYPO3 4.4.4 on PHP 5.2.11 as FastCGI with nginx 0.8.52. Safe mode is enabled.

After some investigation I found where the problem is. In branch 4 htmlmail does not call PHP mail function directly anymore, instead it uses new function in new class t3lib_utility_Mail::mail (there was no such class in branch 3). Inside it PHP mail function is called, always with 5 arguments, even if safe mode is on (in this case null is passed as last argument).
But, in safe mode, PHP raises warning (see below) and mail function returns false if you call mail function with 5 arguments, not regarding to what is passed as as last parameter. In safe mode mail MUST NOT be called with 5 arguments!

Here is a message PHP raises when mail is called with 5 arguments in safe mode:
"Warning: mail(): SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE in Command line code on line 1"

(issue imported from #M16231)


Files

class.t3lib_utility_mail.php.patch (612 Bytes) class.t3lib_utility_mail.php.patch Administrator Admin, 2010-11-03 11:06
class.t3lib_utility_mail.php.4_4.patch (812 Bytes) class.t3lib_utility_mail.php.4_4.patch Administrator Admin, 2010-11-08 19:23
class.t3lib_utility_mail.php.trunc.patch (837 Bytes) class.t3lib_utility_mail.php.trunc.patch Administrator Admin, 2010-11-08 19:23
16231_03-trunk.diff (858 Bytes) 16231_03-trunk.diff Administrator Admin, 2010-12-31 12:58
16231_03-4.4.diff (910 Bytes) 16231_03-4.4.diff Administrator Admin, 2010-12-31 12:58

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #24262: Class 't3lib_utility_PhpOptions' not found in class.t3lib_utility_mail.php on line 69ClosedChristian Kuhn2010-12-01

Actions
Has duplicate TYPO3 Core - Bug #23277: Mailing doesn´t work with safe mode onClosedSteffen Gebert2010-07-27

Actions
Actions

Also available in: Atom PDF