Project

General

Profile

Bug #14273 ยป 0000292-sendTheMail.txt

Administrator Admin, 2004-09-09 20:21

 
function sendTheMail () {
// Sends the mail.
// Requires the recipient, message and headers to be set.
#debug(array($this->recipient,$this->subject,$this->message,$this->headers));
if (trim($this->recipient) && trim($this->message)) { // && trim($this->headers)
$returnPath = (strlen($this->returnPath)>0)?"-f".$this->returnPath:'';
mail( $this->recipient,
$this->subject,
$this->message,
$this->headers,
$returnPath );
// Sending copy:
if ($this->recipient_copy) {
mail( $this->recipient_copy,
$this->subject,
$this->message,
$this->headers,
$returnPath );
}
// Auto response
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 );
}
return true;
} else {return false;}
}
    (1-1/1)