"; - echo "Mailer Error: " . $mail->ErrorInfo; - exit; -} - -echo "Message has been sent"; -?> - -CHANGELOG - -See ChangeLog.txt - -Download: http://sourceforge.net/project/showfiles.php?group_id=26031 - -Andy Prevost diff --git a/main/inc/lib/phpmailer/aboutus.html b/main/inc/lib/phpmailer/aboutus.html deleted file mode 100755 index 70f3e0fcc5..0000000000 --- a/main/inc/lib/phpmailer/aboutus.html +++ /dev/null @@ -1,169 +0,0 @@ - -
- - - - -PHPMailer is the world's leading email transport class and downloaded an -average of more than 32,000 each month. In March 2009, PHPMailer was downloaded -more than 31,000 times -- that's an average of 1,000 downloads daily. Our thanks -to our new users and loyal users. We understand you have many choices available -to select from and we thank you for select our fast and stable tool for your -website and projects.
-Credits:
-PHPMailer's original founder is Brent Matzelle. The current team is:
-Project Administrator: Andy Prevost (codeworxtech),
-
-codeworxtech@users.sourceforge.net
-Author: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net
-Author: Marcus Bointon (coolbru)
-coolbru@users.sourceforge.net
PHPMailer is used in many projects ranging from Open Source to commercial -packages. Our LGPL licensing terms are very flexible and allow for including -PHPMailer to enhance projects of all types. If you discover PHPMailer being used -in a project, please let us know about it.
-WHY USE OUR TOOLS & WHAT'S IN IT FOR YOU?
-A valid question. We're developers too. We've been writing software, primarily for the internet, for more than 15 years. Along the way, there are two major things that had tremendous impact of our company: PHP and Open Source. PHP is without doubt the most popular platform for the internet. There has been more progress in this area of technology because of Open Source software than in any other IT segment. We have used many open source tools, some as learning tools, some as components in projects we were working on. To us, it's not about popularity ... we're committed to robust, stable, and efficient tools you can use to get your projects in your user's hands quickly. So the shorter answer: what's in it for you? rapid development and rapid deployment without fuss and with straight forward open source licensing.
-Now, here's our team:
-| About Andy Prevost, AKA "codeworxtech". | -About Marcus Bointon, AKA "coolbru". | -
|---|---|
|
- www.codeworxtech.com for more information. Our company, Worx International Inc., is the publisher of several Open Source applications and developer tools as well as several commercial PHP applications. The Open Source applications are ttCMS and DCP Portal. The Open Source developer tools include QuickComponents (QuickSkin and QuickCache) and now PHPMailer. - We have staff and offices in the United States, Caribbean, the Middle - East, and our primary development center in Canada. Our company is represented by - agents and resellers globally. -Worx International Inc. is at the forefront of developing PHP applications. Our staff are all Zend Certified university educated and experts at object oriented programming. While Worx International Inc. can handle any project from trouble shooting programs written by others all the way to finished mission-critical applications, we specialize in taking projects from inception all the way through to implementation - on budget, and on time. If you need help with your projects, we're the team to get it done right at a reasonable price. -Over the years, there have been a number of tools that have been constant favorites in all of our projects. We have become the project administrators for most of these tools. -Our developer tools are all Open Source. Here's a brief description: -
We're committed to PHP and to the Open Source community. -Opportunities with Worx International Inc.: -
- Andy Prevost (aka, codeworxtech) - codeworxtech@users.sourceforge.net - - We now also offer website design. hosting, and remote forms processing. Visit WorxStudio.com for more information. - |
-
- Marcus is the technical director of Synchromedia Limited, a UK-based company providing online business services. Synchromedia's main services are: -Smartmessages.net-
info@hand-
How can we help you?-In addition to our headline services, we also provide consulting, development, hosting and sysadmin services, so if you just need a simple web hosting package, we can do that too. Not surprisingly, we know rather a lot about email, so you can talk to us about that too. -Please contact us if you'd like to know more. -Marcus is a regular attendee at PHP London, and occasionally speaks on email at technical conferences. - |
-
'.$this->Lang('smtp_error').$lasterror['smtp_msg']."
\n"; - } - } - $this->ErrorInfo = $msg; - } - - protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body) - { - if (!empty($this->action_function) && function_exists($this->action_function)) { - $params = [$isSent, $to, $cc, $bcc, $subject, $body]; - call_user_func_array($this->action_function, $params); - } - } - - /** - * Adds an address to one of the recipient arrays - * Addresses that have been added already return false, but do not throw exceptions. - * - * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo' - * @param string $address The email address to send to - * @param string $name - * - * @return bool true on success, false if address already used or invalid in some way - */ - private function AddAnAddress($kind, $address, $name = '') - { - if (!preg_match('/^(to|cc|bcc|ReplyTo)$/', $kind)) { - error_log('Invalid recipient array: '.$kind); - - return false; - } - $address = trim($address); - $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim - if (!self::ValidateAddress($address)) { - $this->SetError($this->Lang('invalid_address').': '.$address); - if ($this->exceptions) { - throw new phpmailerException($this->Lang('invalid_address').': '.$address); - } - error_log($this->Lang('invalid_address').': '.$address); - - return false; - } - if ($kind != 'ReplyTo') { - if (!isset($this->all_recipients[strtolower($address)])) { - array_push($this->$kind, [$address, $name]); - $this->all_recipients[strtolower($address)] = true; - - return true; - } - } else { - if (!array_key_exists(strtolower($address), $this->ReplyTo)) { - $this->ReplyTo[strtolower($address)] = [$address, $name]; - - return true; - } - } - - return false; - } - - /** - * Returns the start of a message boundary. - */ - private function GetBoundary($boundary, $charSet, $contentType, $encoding) - { - $result = ''; - if ($charSet == '') { - $charSet = $this->CharSet; - } - if ($contentType == '') { - $contentType = $this->ContentType; - } - if ($encoding == '') { - $encoding = $this->Encoding; - } - $result .= $this->TextLine('--'.$boundary); - $result .= sprintf("Content-Type: %s; charset = \"%s\"", $contentType, $charSet); - $result .= $this->LE; - $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding); - $result .= $this->LE; - - return $result; - } - - /** - * Returns the end of a message boundary. - */ - private function EndBoundary($boundary) - { - return $this->LE.'--'.$boundary.'--'.$this->LE; - } - - /** - * Sets the message type. - */ - private function SetMessageType() - { - if (count($this->attachment) < 1 && strlen($this->AltBody) < 1) { - $this->message_type = 'plain'; - } else { - if (count($this->attachment) > 0) { - $this->message_type = 'attachments'; - } - if (strlen($this->AltBody) > 0 && count($this->attachment) < 1) { - $this->message_type = 'alt'; - } - if (strlen($this->AltBody) > 0 && count($this->attachment) > 0) { - $this->message_type = 'alt_attachments'; - } - } - } - - /** - * Attaches all fs, string, and binary attachments to the message. - * Returns an empty string on failure. - * - * @return string - */ - private function AttachAll() - { - // Return text of body - $mime = []; - $cidUniq = []; - $incl = []; - - // Add all attachments - foreach ($this->attachment as $attachment) { - // Check for string attachment - $bString = $attachment[5]; - if ($bString) { - $string = $attachment[0]; - } else { - $path = $attachment[0]; - } - - if (in_array($attachment[0], $incl)) { - continue; - } - $filename = $attachment[1]; - $name = $attachment[2]; - $encoding = $attachment[3]; - $type = $attachment[4]; - $disposition = $attachment[6]; - $cid = $attachment[7]; - $incl[] = $attachment[0]; - if ($disposition == 'inline' && isset($cidUniq[$cid])) { - continue; - } - $cidUniq[$cid] = true; - - $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE); - $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $this->EncodeHeader($this->SecureHeader($name)), $this->LE); - $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); - - if ($disposition == 'inline') { - $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); - } - - $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $this->EncodeHeader($this->SecureHeader($name)), $this->LE.$this->LE); - - // Encode as string attachment - if ($bString) { - $mime[] = $this->EncodeString($string, $encoding); - if ($this->IsError()) { - return ''; - } - $mime[] = $this->LE.$this->LE; - } else { - $mime[] = $this->EncodeFile($path, $encoding); - if ($this->IsError()) { - return ''; - } - $mime[] = $this->LE.$this->LE; - } - } - - $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE); - - return join('', $mime); - } - - /** - * Encodes attachment in requested format. - * Returns an empty string on failure. - * - * @param string $path The full path to the file - * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' - * - * @see EncodeFile() - * - * @return string - */ - private function EncodeFile($path, $encoding = 'base64') - { - try { - if (!is_readable($path)) { - throw new phpmailerException($this->Lang('file_open').$path, self::STOP_CONTINUE); - } - $magic_quotes = get_magic_quotes_runtime(); - if ($magic_quotes) { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime(0); - } else { - ini_set('magic_quotes_runtime', 0); - } - } - $file_buffer = file_get_contents($path); - $file_buffer = $this->EncodeString($file_buffer, $encoding); - if ($magic_quotes) { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime($magic_quotes); - } else { - ini_set('magic_quotes_runtime', $magic_quotes); - } - } - - return $file_buffer; - } catch (Exception $e) { - $this->SetError($e->getMessage()); - - return ''; - } - } - - /** - * Returns the server hostname or 'localhost.localdomain' if unknown. - * - * @return string - */ - private function ServerHostname() - { - if (!empty($this->Hostname)) { - $result = $this->Hostname; - } elseif (isset($_SERVER['SERVER_NAME'])) { - $result = $_SERVER['SERVER_NAME']; - } else { - $result = 'localhost.localdomain'; - } - - return $result; - } - - /** - * Returns a message in the appropriate language. - * - * @return string - */ - private function Lang($key) - { - if (count($this->language) < 1) { - $this->SetLanguage('en'); // set the default language - } - - if (isset($this->language[$key])) { - return $this->language[$key]; - } else { - return 'Language string failed to load: '.$key; - } - } - - /** - * Changes every end of line from CR or LF to CRLF. - * - * @return string - */ - private function FixEOL($str) - { - $str = str_replace("\r\n", "\n", $str); - $str = str_replace("\r", "\n", $str); - $str = str_replace("\n", $this->LE, $str); - - return $str; - } -} - -class phpmailerException extends Exception -{ - public function errorMessage() - { - $errorMsg = ''.$this->getMessage()."';
-
- foreach ($this->error as $single_error) {
- print_r($single_error);
- }
-
- echo '';
- }
-
- /**
- * Takes over from PHP for the socket warning handler.
- *
- * @param int $errno
- * @param string $errstr
- * @param string $errfile
- * @param int $errline
- */
- private function catchWarning($errno, $errstr, $errfile, $errline)
- {
- $this->error[] = [
- 'error' => "Connecting to the POP3 server raised a PHP warning: ",
- 'errno' => $errno,
- 'errstr' => $errstr,
- ];
- }
-
- // End of class
-}
diff --git a/main/inc/lib/phpmailer/class.smtp.php b/main/inc/lib/phpmailer/class.smtp.php
deleted file mode 100755
index 1b2b8cca26..0000000000
--- a/main/inc/lib/phpmailer/class.smtp.php
+++ /dev/null
@@ -1,863 +0,0 @@
-smtp_conn = 0;
- $this->error = null;
- $this->helo_rply = null;
-
- $this->do_debug = false;
- }
-
- /////////////////////////////////////////////////
- // CONNECTION FUNCTIONS
- /////////////////////////////////////////////////
-
- /**
- * Connect to the server specified on the port specified.
- * If the port is not specified use the default SMTP_PORT.
- * If tval is specified then a connection will try and be
- * established with the server for that number of seconds.
- * If tval is not specified the default is 30 seconds to
- * try on the connection.
- *
- * SMTP CODE SUCCESS: 220
- * SMTP CODE FAILURE: 421
- *
- * @return bool
- */
- public function Connect($host, $port = 0, $tval = 30)
- {
- // set the error val to null so there is no confusion
- $this->error = null;
-
- // make sure we are __not__ connected
- if ($this->connected()) {
- // already connected, generate error
- $this->error = ["error" => "Already connected to a server"];
-
- return false;
- }
-
- if (empty($port)) {
- $port = $this->SMTP_PORT;
- }
-
- // connect to the smtp server
- $this->smtp_conn = @fsockopen($host, // the host of the server
- $port, // the port to use
- $errno, // error number if any
- $errstr, // error message if any
- $tval); // give up after ? secs
- // verify we connected properly
- if (empty($this->smtp_conn)) {
- $this->error = ["error" => "Failed to connect to server",
- "errno" => $errno,
- "errstr" => $errstr, ];
- if ($this->do_debug >= 1) {
- echo "SMTP -> ERROR: ".$this->error["error"].": $errstr ($errno)".$this->CRLF.'