Feature #15785 » 20080112_htmlmail_sendflag.diff
t3lib/class.t3lib_htmlmail.php (working copy) | ||
---|---|---|
var $http_password="";
|
||
var $http_username="";
|
||
var $postfix_version1=false;
|
||
var $sendFlag=false; //flag for function mail, if mail sending was successful
|
||
// Internal
|
||
/* This is how the $theParts-array is normally looking
|
||
... | ... | |
* @return [type] ...
|
||
*/
|
||
function sendTheMail () {
|
||
#debug(array($this->recipient,$this->subject,$this->message,$this->headers));
|
||
$this->sendFlag = false;
|
||
// Sends the mail, requires the recipient, message and headers to be set.
|
||
if (trim($this->recipient) && trim($this->message)) { // && trim($this->headers)
|
||
$returnPath = (strlen($this->returnPath)>0)?"-f".$this->returnPath:'';
|
||
... | ... | |
}
|
||
//If safe mode is on, the fifth parameter to mail is not allowed, so the fix wont work on unix with safe_mode=On
|
||
if(!ini_get('safe_mode') && $this->forceReturnPath) {
|
||
mail($this->recipient,
|
||
$this->sendFlag = mail($this->recipient,
|
||
$this->subject,
|
||
$this->message,
|
||
$this->headers,
|
||
$returnPath);
|
||
} else {
|
||
mail($this->recipient,
|
||
$this->sendFlag = mail($this->recipient,
|
||
$this->subject,
|
||
$this->message,
|
||
$this->headers);
|
||
... | ... | |
// Sending copy:
|
||
if ($this->recipient_copy) {
|
||
if(!ini_get('safe_mode') && $this->forceReturnPath) {
|
||
mail( $this->recipient_copy,
|
||
$this->sendFlag = mail( $this->recipient_copy,
|
||
$this->subject,
|
||
$this->message,
|
||
$this->headers,
|
||
$returnPath);
|
||
} else {
|
||
mail( $this->recipient_copy,
|
||
$this->sendFlag = mail( $this->recipient_copy,
|
||
$this->subject,
|
||
$this->message,
|
||
$this->headers );
|
||
... | ... | |
$theParts = explode('/',$this->auto_respond_msg,2);
|
||
$theParts[1] = str_replace("/",chr(10),$theParts[1]);
|
||
if(!ini_get('safe_mode') && $this->forceReturnPath) {
|
||
mail( $this->from_email,
|
||
$this->sendFlag = mail( $this->from_email,
|
||
$theParts[0],
|
||
$theParts[1],
|
||
"From: ".$this->recipient,
|
||
$returnPath);
|
||
} else {
|
||
mail( $this->from_email,
|
||
$this->sendFlag = mail( $this->from_email,
|
||
$theParts[0],
|
||
$theParts[1],
|
||
"From: ".$this->recipient);
|
||
... | ... | |
* @return [type] ...
|
||
*/
|
||
function getBoundary() {
|
||
// Returns boundaries
|
||
$this->part++;
|
||
return "----------".uniqid("part_".$this->part."_");
|