diff options
author | Pascal Kriete <pascal.kriete@ellislab.com> | 2010-11-04 22:59:52 +0100 |
---|---|---|
committer | Pascal Kriete <pascal.kriete@ellislab.com> | 2010-11-04 22:59:52 +0100 |
commit | e917f9be8b05c81357c1c2c9730d5060685d644d (patch) | |
tree | b6a7d5ce8ba57b69ba61454f77829b04f2ce5974 /system/libraries/Email.php | |
parent | 5b2d2da5ae2e97043c6bef53e565d30e50196e2b (diff) | |
parent | e1f6e9ddff788f6a154f5f35dc117d14aeb0c484 (diff) |
Automated merge with http://hg.ellislab.com/CodeIgniter2
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r-- | system/libraries/Email.php | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php index af48757bb..6c0309b0d 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -129,7 +129,7 @@ class CI_Email { $this->_smtp_auth = ($this->smtp_user == '' AND $this->smtp_pass == '') ? FALSE : TRUE; $this->_safe_mode = ((boolean)@ini_get("safe_mode") === FALSE) ? FALSE : TRUE; } - + // -------------------------------------------------------------------- /** @@ -161,7 +161,7 @@ class CI_Email { $this->_attach_disp = array(); } } - + // -------------------------------------------------------------------- /** @@ -202,7 +202,7 @@ class CI_Email { $this->_set_header('From', $name.' <'.$from.'>'); $this->_set_header('Return-Path', '<'.$from.'>'); } - + // -------------------------------------------------------------------- /** @@ -238,7 +238,7 @@ class CI_Email { $this->_set_header('Reply-To', $name.' <'.$replyto.'>'); $this->_replyto_flag = TRUE; } - + // -------------------------------------------------------------------- /** @@ -273,7 +273,7 @@ class CI_Email { break; } } - + // -------------------------------------------------------------------- /** @@ -300,7 +300,7 @@ class CI_Email { $this->_cc_array = $cc; } } - + // -------------------------------------------------------------------- /** @@ -336,7 +336,7 @@ class CI_Email { $this->_set_header('Bcc', implode(", ", $bcc)); } } - + // -------------------------------------------------------------------- /** @@ -351,7 +351,7 @@ class CI_Email { $subject = $this->_prep_q_encoding($subject); $this->_set_header('Subject', $subject); } - + // -------------------------------------------------------------------- /** @@ -365,7 +365,7 @@ class CI_Email { { $this->_body = stripslashes(rtrim(str_replace("\r", "", $body))); } - + // -------------------------------------------------------------------- /** @@ -396,7 +396,7 @@ class CI_Email { { $this->_headers[$header] = $value; } - + // -------------------------------------------------------------------- /** @@ -422,7 +422,7 @@ class CI_Email { } return $email; } - + // -------------------------------------------------------------------- /** @@ -436,7 +436,7 @@ class CI_Email { { $this->alt_message = ($str == '') ? '' : $str; } - + // -------------------------------------------------------------------- /** @@ -450,7 +450,7 @@ class CI_Email { { $this->mailtype = ($type == 'html') ? 'html' : 'text'; } - + // -------------------------------------------------------------------- /** @@ -464,7 +464,7 @@ class CI_Email { { $this->wordwrap = ($wordwrap === FALSE) ? FALSE : TRUE; } - + // -------------------------------------------------------------------- /** @@ -478,7 +478,7 @@ class CI_Email { { $this->protocol = ( ! in_array($protocol, $this->_protocols, TRUE)) ? 'mail' : strtolower($protocol); } - + // -------------------------------------------------------------------- /** @@ -504,7 +504,7 @@ class CI_Email { $this->priority = $n; } - + // -------------------------------------------------------------------- /** @@ -524,7 +524,7 @@ class CI_Email { $this->newline = $newline; } - + // -------------------------------------------------------------------- /** @@ -544,7 +544,7 @@ class CI_Email { $this->crlf = $crlf; } - + // -------------------------------------------------------------------- /** @@ -558,7 +558,7 @@ class CI_Email { $this->_alt_boundary = "B_ALT_".uniqid(''); // multipart/alternative $this->_atc_boundary = "B_ATC_".uniqid(''); // attachment boundary } - + // -------------------------------------------------------------------- /** @@ -575,7 +575,7 @@ class CI_Email { return "<".uniqid('').strstr($from, '@').">"; } - + // -------------------------------------------------------------------- /** @@ -595,7 +595,7 @@ class CI_Email { return $this->protocol; } } - + // -------------------------------------------------------------------- /** @@ -650,7 +650,7 @@ class CI_Email { return 'plain'; } } - + // -------------------------------------------------------------------- /** @@ -668,7 +668,7 @@ class CI_Email { return sprintf("%s %s%04d", date("D, j M Y H:i:s"), $operator, $timezone); } - + // -------------------------------------------------------------------- /** @@ -681,7 +681,7 @@ class CI_Email { { return "This is a multi-part message in MIME format.".$this->newline."Your email application may not support this format."; } - + // -------------------------------------------------------------------- /** @@ -710,7 +710,7 @@ class CI_Email { return TRUE; } - + // -------------------------------------------------------------------- /** @@ -724,7 +724,7 @@ class CI_Email { { return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $address)) ? FALSE : TRUE; } - + // -------------------------------------------------------------------- /** @@ -740,11 +740,11 @@ class CI_Email { { if (preg_match('/\<(.*)\>/', $email, $match)) { - return $match['1']; + return $match['1']; } - else + else { - return $email; + return $email; } } @@ -754,17 +754,17 @@ class CI_Email { { if (preg_match( '/\<(.*)\>/', $addy, $match)) { - $clean_email[] = $match['1']; + $clean_email[] = $match['1']; } - else + else { - $clean_email[] = $addy; + $clean_email[] = $addy; } } return $clean_email; } - + // -------------------------------------------------------------------- /** @@ -804,7 +804,7 @@ class CI_Email { for ($x = 1; $x <= $i; $x ++) { - $n .= "\n"; + $n .= "\n"; } $body = str_replace($n, "\n\n", $body); @@ -812,7 +812,7 @@ class CI_Email { return $this->word_wrap($body, '76'); } - + // -------------------------------------------------------------------- /** @@ -908,7 +908,7 @@ class CI_Email { return $output; } - + // -------------------------------------------------------------------- /** @@ -926,7 +926,7 @@ class CI_Email { $this->_set_header('Message-ID', $this->_get_message_id()); $this->_set_header('Mime-Version', '1.0'); } - + // -------------------------------------------------------------------- /** @@ -961,7 +961,7 @@ class CI_Email { $this->_header_str = rtrim($this->_header_str); } } - + // -------------------------------------------------------------------- /** @@ -1150,7 +1150,7 @@ class CI_Email { return; } - + // -------------------------------------------------------------------- /** @@ -1245,7 +1245,7 @@ class CI_Email { } // -------------------------------------------------------------------- - + /** * Prep Q Encoding * @@ -1317,7 +1317,7 @@ class CI_Email { } // -------------------------------------------------------------------- - + /** * Send Email * @@ -1358,7 +1358,7 @@ class CI_Email { return TRUE; } } - + // -------------------------------------------------------------------- /** @@ -1416,7 +1416,7 @@ class CI_Email { $this->_spool_email(); } } - + // -------------------------------------------------------------------- /** @@ -1429,7 +1429,7 @@ class CI_Email { { $this->_finalbody = preg_replace_callback("/\{unwrap\}(.*?)\{\/unwrap\}/si", array($this, '_remove_nl_callback'), $this->_finalbody); } - + // -------------------------------------------------------------------- /** @@ -1447,7 +1447,7 @@ class CI_Email { return $matches[1]; } - + // -------------------------------------------------------------------- /** @@ -1492,7 +1492,7 @@ class CI_Email { $this->_set_error_message('email_sent', $this->_get_protocol()); return TRUE; } - + // -------------------------------------------------------------------- /** @@ -1528,7 +1528,7 @@ class CI_Email { } } } - + // -------------------------------------------------------------------- /** @@ -1550,12 +1550,12 @@ class CI_Email { fputs($fp, $this->_header_str); fputs($fp, $this->_finalbody); - $status = pclose($fp); - + $status = pclose($fp); + if (version_compare(PHP_VERSION, '4.2.3') == -1) { $status = $status >> 8 & 0xFF; - } + } if ($status != 0) { @@ -1566,7 +1566,7 @@ class CI_Email { return TRUE; } - + // -------------------------------------------------------------------- /** @@ -1635,7 +1635,7 @@ class CI_Email { $this->_send_command('quit'); return TRUE; } - + // -------------------------------------------------------------------- /** @@ -1662,7 +1662,7 @@ class CI_Email { $this->_set_error_message($this->_get_smtp_data()); return $this->_send_command('hello'); } - + // -------------------------------------------------------------------- /** @@ -1729,7 +1729,7 @@ class CI_Email { return TRUE; } - + // -------------------------------------------------------------------- /** @@ -1783,7 +1783,7 @@ class CI_Email { return TRUE; } - + // -------------------------------------------------------------------- /** @@ -1804,7 +1804,7 @@ class CI_Email { return TRUE; } } - + // -------------------------------------------------------------------- /** @@ -1829,7 +1829,7 @@ class CI_Email { return $data; } - + // -------------------------------------------------------------------- /** @@ -1842,7 +1842,7 @@ class CI_Email { { return (isset($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : 'localhost.localdomain'; } - + // -------------------------------------------------------------------- /** @@ -1862,7 +1862,7 @@ class CI_Email { $rip = (isset($_SERVER['REMOTE_ADDR']) AND $_SERVER['REMOTE_ADDR'] != "") ? $_SERVER['REMOTE_ADDR'] : FALSE; $fip = (isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND $_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : FALSE; - if ($cip && $rip) $this->_IP = $cip; + if ($cip && $rip) $this->_IP = $cip; elseif ($rip) $this->_IP = $rip; elseif ($cip) $this->_IP = $cip; elseif ($fip) $this->_IP = $fip; @@ -1884,7 +1884,7 @@ class CI_Email { return $this->_IP; } - + // -------------------------------------------------------------------- /** @@ -1908,7 +1908,7 @@ class CI_Email { $msg .= "<pre>".$this->_header_str."\n".htmlspecialchars($this->_subject)."\n".htmlspecialchars($this->_finalbody).'</pre>'; return $msg; } - + // -------------------------------------------------------------------- /** @@ -1932,7 +1932,7 @@ class CI_Email { $this->_debug_msg[] = str_replace('%s', $val, $line)."<br />"; } } - + // -------------------------------------------------------------------- /** |