[Typo3-dev] safe mode and mail() in class.t3lib_htmlmail.php

Jan-Erik Revsbech jer at moccompany.com
Mon Oct 25 11:33:18 CEST 2004


This is an error, if you look at the source code this check is made

if(!ini_get('safe_mode')) {
  //Call mail() with 5 parameters
}
else {
  //Call mail() with 4 parameters
}

before all calls to mail(), except the line you are talking about. I must
have been tired when I implemented this. I'll update it in CVS right away.
This does however mean that you can not make the returnpath correct (it will
be set to the user running apache) when safe mode is enabled.

/Jan-Erik


----- Original Message ----- 
From: "Lars E. D. Jensen" <ledj-typo3 at dcmedia.biz>
Newsgroups: typo3.dev
To: <typo3-dev at lists.netfielders.de>
Sent: Monday, October 25, 2004 10:27 AM
Subject: [Typo3-dev] safe mode and mail() in class.t3lib_htmlmail.php


> When trying to send a normal mail from a standard mailform I get this
> warning when safe mode is enabled:
>
> Warning: mail(): SAFE MODE Restriction in effect. The fifth parameter is
> disabled in SAFE MODE.
> in /var/lib/typo3/typo3_src-3.7.0/t3lib/class.t3lib_htmlmail.php on line
> 650
>
> if ($this->auto_respond_msg)    {
>                                 $theParts = explode("/"
> $this->auto_respond_msg,2);
>                                 $theParts[1] = str_replace("/",chr(10)
> $theParts[1]);
>                                 mail(   $this->from_email,
>                                                 $theParts[0],
>                                                 $theParts[1],
>                                                 "From: ".$this->recipient,
>                                                 $returnPath); # line 650
>                         }
>
> The mail gets send though, but the function should be made compatible with
> safe mode. Don't know how since the fifth parameter is disabled in safe
> mode.
>
> Maybe a misconfiguration of the server but I doubt that.
>
> -- 
> Med venlig hilsen / Best regards
> Lars E. D. Jensen - DCmedia - TYPO3 Business Solutions
> +45 3116 5002 / +45 3695 9177
> ledj at dcmedia.biz - http://dcmedia.biz
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>





More information about the TYPO3-dev mailing list