/*~ class.smtp.php
.---------------------------------------------------------------------------.
| Software: PHPMailer - PHP email class |
-| Version: 2.0.0 rc1 |
+| Version: 2.0.4 |
| Contact: via sourceforge.net support pages (also www.codeworxtech.com) |
| Info: http://phpmailer.sourceforge.net |
| Support: http://sourceforge.net/projects/phpmailer/ |
* Sets VERP use on/off (default is off)
* @var bool
*/
- var $do_verp = false;
+ var $do_verp = FALSE;
/**#@+
* @access private
# for now we will just give an error saying we
# are already connected
$this->error = array("error" => "Already connected to a server");
- return false;
+ return FALSE;
}
if(empty($port)) {
echo "SMTP -> ERROR: " . $this->error["error"] .
": $errstr ($errno)" . $this->CRLF;
}
- return false;
+ return FALSE;
}
# sometimes the SMTP server takes a little longer to respond
echo "SMTP -> FROM SERVER:" . $this->CRLF . $announce;
}
- return true;
+ return TRUE;
}
/**
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
// Send encoded username
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
// Send encoded password
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/**
"EOF caught while checking if connected";
}
$this->Close();
- return false;
+ return FALSE;
}
- return true; # everything looks good
+ return TRUE; # everything looks good
}
- return false;
+ return FALSE;
}
/**
if(!$this->connected()) {
$this->error = array(
"error" => "Called Data() without being connected");
- return false;
+ return FALSE;
}
fputs($this->smtp_conn,"DATA" . $this->CRLF);
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
# the server is ready to accept data!
# and we can process all lines before a blank "" line as
# headers.
$field = substr($lines[0],0,strpos($lines[0],":"));
- $in_headers = false;
+ $in_headers = FALSE;
if(!empty($field) && !strstr($field," ")) {
- $in_headers = true;
+ $in_headers = TRUE;
}
$max_line_length = 998; # used below; set here for ease in change
while(list(,$line) = @each($lines)) {
$lines_out = null;
if($line == "" && $in_headers) {
- $in_headers = false;
+ $in_headers = FALSE;
}
# ok we need to break this line up into several
# smaller lines
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/**
if(!$this->connected()) {
$this->error = array(
"error" => "Called Expand() without being connected");
- return false;
+ return FALSE;
}
fputs($this->smtp_conn,"EXPN " . $name . $this->CRLF);
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
# parse the reply and place in our array to return to user
if(!$this->connected()) {
$this->error = array(
"error" => "Called Hello() without being connected");
- return false;
+ return FALSE;
}
# if a hostname for the HELO was not specified determine
if(!$this->SendHello("EHLO", $host))
{
if(!$this->SendHello("HELO", $host))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/**
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
$this->helo_rply = $rply;
- return true;
+ return TRUE;
}
/**
if(!$this->connected()) {
$this->error = array(
"error" => "Called Help() without being connected");
- return false;
+ return FALSE;
}
$extra = "";
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
return $rply;
if(!$this->connected()) {
$this->error = array(
"error" => "Called Mail() without being connected");
- return false;
+ return FALSE;
}
$useVerp = ($this->do_verp ? "XVERP" : "");
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/**
if(!$this->connected()) {
$this->error = array(
"error" => "Called Noop() without being connected");
- return false;
+ return FALSE;
}
fputs($this->smtp_conn,"NOOP" . $this->CRLF);
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/**
if(!$this->connected()) {
$this->error = array(
"error" => "Called Quit() without being connected");
- return false;
+ return FALSE;
}
# send the quit command to the server
echo "SMTP -> FROM SERVER:" . $this->CRLF . $byemsg;
}
- $rval = true;
+ $rval = TRUE;
$e = null;
$code = substr($byemsg,0,3);
$e = array("error" => "SMTP server rejected quit command",
"smtp_code" => $code,
"smtp_rply" => substr($byemsg,4));
- $rval = false;
+ $rval = FALSE;
if($this->do_debug >= 1) {
echo "SMTP -> ERROR: " . $e["error"] . ": " .
$byemsg . $this->CRLF;
if(!$this->connected()) {
$this->error = array(
"error" => "Called Recipient() without being connected");
- return false;
+ return FALSE;
}
fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF);
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/**
if(!$this->connected()) {
$this->error = array(
"error" => "Called Reset() without being connected");
- return false;
+ return FALSE;
}
fputs($this->smtp_conn,"RSET" . $this->CRLF);
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/**
if(!$this->connected()) {
$this->error = array(
"error" => "Called Send() without being connected");
- return false;
+ return FALSE;
}
fputs($this->smtp_conn,"SEND FROM:" . $from . $this->CRLF);
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/**
if(!$this->connected()) {
$this->error = array(
"error" => "Called SendAndMail() without being connected");
- return false;
+ return FALSE;
}
fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF);
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/**
if(!$this->connected()) {
$this->error = array(
"error" => "Called SendOrMail() without being connected");
- return false;
+ return FALSE;
}
fputs($this->smtp_conn,"SOML FROM:" . $from . $this->CRLF);
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
/**
if($this->do_debug >= 1) {
echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF;
}
- return false;
+ return FALSE;
}
/**
if(!$this->connected()) {
$this->error = array(
"error" => "Called Verify() without being connected");
- return false;
+ return FALSE;
}
fputs($this->smtp_conn,"VRFY " . $name . $this->CRLF);
echo "SMTP -> ERROR: " . $this->error["error"] .
": " . $rply . $this->CRLF;
}
- return false;
+ return FALSE;
}
return $rply;
}