From 46e4fce4588bc6b28307babdbc5241b71f7a3e19 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 21 Feb 2005 03:42:27 +0000 Subject: [PATCH] Shortened instance variables. --- mail.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/mail.php b/mail.php index 011a5e3..cd07a1d 100644 --- a/mail.php +++ b/mail.php @@ -30,19 +30,19 @@ class Mail /** * Global environment variables * - * @var toemail The recipient + * @var to The recipient * @var subject Subject of the message * @var body Text/body of the email - * @var fromemail The sender's email + * @var from The sender's email * @var fromname The sender's name * @var headers Additional headers */ - var $toemail = ''; + var $to = ''; var $subject = ''; var $body = ''; - var $fromemail = ''; + var $from = ''; var $fromname = ''; - var $headers = array(); + var $headers = ''; /** * Sends an email to the specified address with the specified @@ -60,36 +60,36 @@ class Mail return false; } - $this->toemail = $this->_fetch_first_line($this->toemail); - $this->fromemail = $this->_fetch_first_line($this->fromemail); + $this->to = $this->_fetch_first_line($this->to); + $this->from = $this->_fetch_first_line($this->from); - if (!$this->fromemail) + if (!$this->from) { $_isso->debug("email: no from -> not sending"); return false; } else { - $this->fromemail = trim($_isso->unsanitize($this->fromemail)); + $this->from = trim($_isso->unsanitize($this->from)); } if (!$this->fromname) { - $this->fromname = $this->fromemail; + $this->fromname = $this->from; } else { $this->fromname = trim($_isso->unsanitize($this->fromname)); } - if (!$this->toemail) + if (!$this->to) { $_isso->debug("email: no recipient -> not sending"); return false; } else { - $this->toemail = trim($_isso->unsanitize($this->toemail)); + $this->to = trim($_isso->unsanitize($this->to)); } if (!$this->subject) @@ -99,7 +99,7 @@ class Mail } else { - $this->subject = trim($_isso->unsanitize($this->_fetch_first_line($subject))); + $this->subject = trim($_isso->unsanitize($this->_fetch_first_line($this->subject))); } if (!$this->body) @@ -114,14 +114,14 @@ class Mail } $headers = $this->_convert_line_breaks($this->headers, "\n"); - $headers .= "From \"{$this->fromname}\" <{$this->fromemail}>\n"; - $headers .= "Return-Path: {$this->fromemail}\n"; + $headers .= "From \"{$this->fromname}\" <{$this->from}>\n"; + $headers .= "Return-Path: {$this->from}\n"; $headers .= "X-Mailer: ISSO Mail Framework \$Revision$\n"; $headers .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n"; $headers .= "Content-Transfer-Encoding: 7bit\n"; $headers = trim($headers); - if (mail($this->toemail, $this->subject, $this->body, $headers, "-f {$this->fromemail}")) + if (mail($this->to, $this->subject, $this->body, $headers, "-f {$this->from}")) { $_isso->debug("email: sent -> good"); return true; -- 2.43.5