r37619 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37618‎ | r37619 | r37620 >
Date:15:51, 13 July 2008
Author:siebrand
Status:old
Tags:
Comment:
* rename EmailArticle to EmailPage
* rename all files, functions, and parameters from "*Article" to "*Page"
* update phpMailer to 2.1
* bump version
* process above changes in Translate

Warning: You need to update your path and settings names on update
Modified paths:
  • /trunk/extensions/EmailArticle (deleted) (history)
  • /trunk/extensions/EmailPage (added) (history)
  • /trunk/extensions/EmailPage (added) (history)
  • /trunk/extensions/EmailPage/EmailArticle.alias.php (deleted) (history)
  • /trunk/extensions/EmailPage/EmailArticle.i18n.php (deleted) (history)
  • /trunk/extensions/EmailPage/EmailArticle.php (deleted) (history)
  • /trunk/extensions/EmailPage/EmailArticle_body.php (deleted) (history)
  • /trunk/extensions/EmailPage/EmailPage.alias.php (added) (history)
  • /trunk/extensions/EmailPage/EmailPage.alias.php (added) (history)
  • /trunk/extensions/EmailPage/EmailPage.i18n.php (added) (history)
  • /trunk/extensions/EmailPage/EmailPage.i18n.php (added) (history)
  • /trunk/extensions/EmailPage/EmailPage.php (added) (history)
  • /trunk/extensions/EmailPage/EmailPage.php (added) (history)
  • /trunk/extensions/EmailPage/EmailPage_body.php (added) (history)
  • /trunk/extensions/EmailPage/EmailPage_body.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1 (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1 (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1.0beta2 (deleted) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/ChangeLog.txt (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/README (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/class.phpmailer.php (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/class.pop3.php (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/class.smtp.php (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/codeworxtech.html (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/docs/faq.html (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/docs/use_gmail.txt (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-br.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-ca.php (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-cz.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-de.php (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-dk.php (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-en.php (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-es.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-et.php (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-fi.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-fo.php (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-fr.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-hu.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-it.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-ja.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-nl.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-no.php (modified) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-pl.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-ro.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-ru.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-se.php (added) (history)
  • /trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-tr.php (modified) (history)
  • /trunk/extensions/Translate/aliases.txt (modified) (history)
  • /trunk/extensions/Translate/groups/mediawiki-defines.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/EmailPage/EmailPage.alias.php
@@ -0,0 +1,59 @@
 2+<?php
 3+/**
 4+ * Aliases for Special:EmailPage
 5+ *
 6+ * @addtogroup Extensions
 7+ */
 8+
 9+$aliases = array();
 10+
 11+/** English
 12+ * @author Jon Harald Søby
 13+ */
 14+$aliases['en'] = array(
 15+ 'EmailPage' => array( 'EmailPage' ),
 16+);
 17+
 18+/** Arabic (العربية) */
 19+$aliases['ar'] = array(
 20+ 'EmailPage' => array( 'مراسلة المقالة' ),
 21+);
 22+
 23+/** Egyptian Spoken Arabic (مصرى) */
 24+$aliases['arz'] = array(
 25+ 'EmailPage' => array( 'مراسلة المقالة' ),
 26+);
 27+
 28+/** French (Français) */
 29+$aliases['fr'] = array(
 30+ 'EmailPage' => array( 'EnvoyerPage', 'Envoyer Page' ),
 31+);
 32+
 33+/** Hebrew (עברית)
 34+ * @author Rotem Liss
 35+ */
 36+$aliases['he'] = array(
 37+ 'EmailPage' => array( 'שליחת_דף_בדואר' ),
 38+);
 39+
 40+/** Haitian (Kreyòl ayisyen) */
 41+$aliases['ht'] = array(
 42+ 'EmailPage' => array( 'EmèlAtik' ),
 43+);
 44+
 45+/** Hungarian (Magyar) */
 46+$aliases['hu'] = array(
 47+ 'EmailPage' => array( 'Szócikk elküldése e-mailben' ),
 48+);
 49+
 50+/** Dutch (Nederlands) */
 51+$aliases['nl'] = array(
 52+ 'EmailPage' => array( 'PaginaE-mailen', 'PaginaEmailen' ),
 53+);
 54+
 55+/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
 56+ * @author Jon Harald Søby
 57+ */
 58+$aliases['no'] = array(
 59+ 'EmailPage' => array( 'Send_side_som_e-post' ),
 60+);
Property changes on: trunk/extensions/EmailPage/EmailPage.alias.php
___________________________________________________________________
Added: svn:mergeinfo
Added: svn:eol-style
161 + native
Index: trunk/extensions/EmailPage/EmailPage_body.php
@@ -0,0 +1,253 @@
 2+<?php
 3+if (!defined('MEDIAWIKI')) die();
 4+
 5+class SpecialEmailPage extends SpecialPage {
 6+
 7+ var $recipients = array();
 8+ var $title;
 9+ var $subject;
 10+ var $header;
 11+ var $cat;
 12+ var $group;
 13+ var $list;
 14+ var $textonly;
 15+ var $css;
 16+
 17+ public function __construct() {
 18+ global $wgEmailPageGroup;
 19+ SpecialPage::SpecialPage('EmailPage', $wgEmailPageGroup);
 20+ }
 21+
 22+ /**
 23+ * Override SpecialPage::execute($param = '')
 24+ */
 25+ function execute($param) {
 26+ global $wgOut, $wgUser, $wgEmailPageContactsCat, $wgGroupPermissions, $wgSitename, $wgEmailPageCss, $wgEmailPageAllowAllUsers;
 27+ $db =& wfGetDB(DB_SLAVE);
 28+ $param = str_replace('_', ' ', $param);
 29+
 30+ wfLoadExtensionMessages( 'EmailPage' );
 31+
 32+ $this->setHeaders();
 33+
 34+ # Get info from request or set to defaults
 35+ $this->title = isset($_REQUEST['ea-title']) ? $_REQUEST['ea-title'] : $param;
 36+ $this->subject = isset($_REQUEST['ea-subject']) ? $_REQUEST['ea-subject'] : '' . wfMsg('ea-pagesend', $this->title, $wgSitename );
 37+ $this->header = isset($_REQUEST['ea-header']) ? $_REQUEST['ea-header'] : '';
 38+ $this->cat = isset($_REQUEST['ea-cat']) ? $_REQUEST['ea-cat'] : '';
 39+ $this->group = isset($_REQUEST['ea-group']) ? $_REQUEST['ea-group'] : '';
 40+ $this->list = isset($_REQUEST['ea-list']) ? $_REQUEST['ea-list'] : '';
 41+ $this->textonly = isset($_REQUEST['ea-textonly']) ? $_REQUEST['ea-textonly'] : false;
 42+ $this->css = isset($_REQUEST['ea-css']) ? $_REQUEST['ea-css'] : $wgEmailPageCss;
 43+
 44+ # Bail if no page title to send has been specified
 45+ if ($this->title) $wgOut->addWikiText(wfMsg('ea-heading', $this->title));
 46+ else return $wgOut->addWikiText(wfMsg('ea-nopage'));
 47+
 48+ # If the send button was clicked, attempt to send and exit
 49+ if (isset($_REQUEST['ea-send'])) return $this->send();
 50+
 51+ # Render form
 52+ $special = Title::makeTitle(NS_SPECIAL, 'EmailPage');
 53+ $wgOut->addHTML(wfElement('form',array(
 54+ 'class' => 'EmailPage',
 55+ 'action' => $special->getLocalURL('action=submit'),
 56+ 'method' => 'POST'
 57+ ),null));
 58+ $wgOut->addHTML('<fieldset><legend>'.wfMsg('ea-selectrecipients').'</legend>');
 59+ $wgOut->addHTML('<table style="padding:0;margin:0;border:none;">');
 60+
 61+ # If $wgEmailPageContactsCat is set, create a select list of all categories
 62+ if ($wgEmailPageContactsCat) {
 63+ $cats = '';
 64+ $result = $db->select(
 65+ 'categorylinks',
 66+ 'cl_from',
 67+ 'cl_to = '.$db->addQuotes($wgEmailPageContactsCat),
 68+ __METHOD__,
 69+ array('ORDER BY' => 'cl_sortkey')
 70+ );
 71+ if ($result instanceof ResultWrapper) $result = $result->result;
 72+ if ($result) while ($row = $db->fetchRow($result)) {
 73+ $t = Title::newFromID($row[0]);
 74+ if ($t->getNamespace() == NS_CATEGORY) {
 75+ $cat = $t->getText();
 76+ $selected = $cat == $this->cat ? ' selected' : '';
 77+ $cats .= "<option$selected>$cat</option>";
 78+ }
 79+ }
 80+ if ($cats) $wgOut->addHTML("<tr><td>From category:</td><td><select name=\"ea-cat\"><option/>$cats</select></td></tr>\n");
 81+ }
 82+
 83+ # Allow selection of a group
 84+ $groups = '<option/>';
 85+ foreach (array_keys($wgGroupPermissions) as $group) if ($group != '*') {
 86+ $selected = $group == $this->group ? ' selected' : '';
 87+ if ($wgEmailPageAllowAllUsers || $group != 'user') $groups .= "<option$selected>$group</option>";
 88+ }
 89+ $wgOut->addHTML("<tr><td>".wfMsg('ea-fromgroup')."</td><td><select name=\"ea-group\">$groups</select></td></tr>\n");
 90+ $wgOut->addHTML('</table>');
 91+
 92+ # Addition of named list
 93+ $wgOut->addWikiText(wfMsg('ea-selectlist'));
 94+ $wgOut->addHTML("<textarea name=\"ea-list\" rows=\"5\">{$this->list}</textarea><br />\n");
 95+ $wgOut->addHTML('</fieldset>');
 96+
 97+ $wgOut->addHTML('<fieldset><legend>'.wfMsg('ea-compose').'</legend>');
 98+
 99+ # Subject
 100+ $wgOut->addWikiText(wfMsg('ea-subject'));
 101+ $wgOut->addHTML(wfElement('input',array('type' => 'text', 'name' => 'ea-subject', 'value' => $this->subject, 'style' => "width:100%")));
 102+
 103+ # Header
 104+ $wgOut->addWikiText(wfMsg('ea-header'));
 105+ $wgOut->addHTML("<textarea name=\"ea-header\" rows=\"5\">{$this->header}</textarea><br />\n");
 106+
 107+ # CSS
 108+ $csss = '';
 109+ $result = $db->select(
 110+ 'page',
 111+ 'page_id',
 112+ 'page_title LIKE \'%.css\'',
 113+ __METHOD__,
 114+ array('ORDER BY' => 'page_title')
 115+ );
 116+ if ($result instanceof ResultWrapper) $result = $result->result;
 117+ if ($result) while ($row = $db->fetchRow($result)) {
 118+ $t = Title::newFromID($row[0])->getPrefixedText();
 119+ $selected = $t == $this->css ? ' selected' : '';
 120+ $csss .= "<option$selected>$t</option>";
 121+ }
 122+ if ($csss) {
 123+ $wgOut->addWikiText(wfMsg('ea-selectcss'));
 124+ $wgOut->addHTML("<select name=\"ea-css\"><option/>$csss</select>\n");
 125+ }
 126+
 127+ $wgOut->addHTML("</fieldset>");
 128+
 129+ # Submit buttons & hidden values
 130+ $wgOut->addHTML(wfElement('input', array('type' => 'submit', 'name' => 'ea-send', 'value' => wfMsg('ea-send'))));
 131+ $wgOut->addHTML(wfElement('input', array('type' => 'submit', 'name' => 'ea-show', 'value' => wfMsg('ea-show'))));
 132+ $wgOut->addHTML(wfElement('input', array('type' => 'hidden', 'name' => 'ea-title', 'value' => $this->title)));
 133+
 134+ $wgOut->addHTML('</form>');
 135+
 136+ # If the show button was clicked, render the list
 137+ if (isset($_REQUEST['ea-show'])) return $this->send(false);
 138+ }
 139+
 140+ # Send the message to the recipients (or just list them if arg = false)
 141+ function send($send = true) {
 142+ global $wgOut, $wgUser, $wgParser, $wgServer, $wgScript, $wgArticlePath, $wgScriptPath,
 143+ $wgEmailPageCss, $wgEmailPageGroup, $wgEmailPageAllowRemoteAddr, $wgEmailPageAllowAllUsers;
 144+
 145+ # Set error and bail if user not in postmaster group, and request not from trusted address
 146+ if ($wgEmailPageGroup && !in_array($wgEmailPageGroup, $wgUser->getGroups()) && !in_array($_SERVER['REMOTE_ADDR'], $wgEmailPageAllowRemoteAddr)) {
 147+ $denied = wfMsg('ea-denied');
 148+ $wgOut->addWikiText(wfMsg('ea-error', $this->title, $denied ));
 149+ return false;
 150+ }
 151+
 152+ $db = &wfGetDB(DB_SLAVE);
 153+ $title = Title::newFromText($this->title);
 154+ $opt = new ParserOptions;
 155+
 156+ # Get contact page titles from selected cat
 157+ if ($this->cat) {
 158+ $result = $db->select(
 159+ 'categorylinks',
 160+ 'cl_from',
 161+ 'cl_to = '.$db->addQuotes($this->cat),
 162+ __METHOD__,
 163+ array('ORDER BY' => 'cl_sortkey')
 164+ );
 165+ if ($result instanceof ResultWrapper) $result = $result->result;
 166+ if ($result) while ($row = $db->fetchRow($result)) $this->addRecipient(Title::newFromID($row[0]));
 167+ }
 168+
 169+ # Get email addresses from users in selected group
 170+ if ($this->group && ($wgEmailPageAllowAllUsers || $this->group != 'user')) {
 171+ $group = $db->addQuotes($this->group);
 172+ $result = $this->group == 'user'
 173+ ? $db->select('user', 'user_email', 'user_email != \'\'', __METHOD__)
 174+ : $db->select(array('user', 'user_groups'), 'user_email', "ug_user = user_id AND ug_group = $group", __METHOD__);
 175+ if ($result instanceof ResultWrapper) $result = $result->result;
 176+ if ($result) while ($row = $db->fetchRow($result)) $this->addRecipient($row[0]);
 177+ }
 178+
 179+ # Recipients from list (expand templates in wikitext)
 180+ $list = $wgParser->preprocess($this->list, $title, $opt);
 181+ foreach (preg_split("/[\\x00-\\x1f,;*]+/", $list) as $item) $this->addRecipient($item);
 182+
 183+ # Compose the wikitext content of the page to send
 184+ $page = new Article($title);
 185+ $message = $page->getContent();
 186+ if ($this->header) $message = "{$this->header}\n\n$message";
 187+
 188+ # Convert the message text to html unless textonly
 189+ if ($this->textonly == '') {
 190+
 191+ # Parse the wikitext using absolute URL's for local page links
 192+ $tmp = array($wgArticlePath, $wgScriptPath, $wgScript);
 193+ $wgArticlePath = $wgServer.$wgArticlePath;
 194+ $wgScriptPath = $wgServer.$wgScriptPath;
 195+ $wgScript = $wgServer.$wgScript;
 196+ $message = $wgParser->parse($message, $title, $opt, true, true)->getText();
 197+ list($wgArticlePath,$wgScriptPath,$wgScript) = $tmp;
 198+
 199+ # Get CSS content if any
 200+ if ($this->css) {
 201+ $page = new Article(Title::newFromText($this->css));
 202+ $css = '<style type="text/css">'.$page->getContent().'</style>';
 203+ }
 204+
 205+ # Create a html wrapper for the message
 206+ $head = "<head>$css</head>";
 207+ $message = "<html>$head<body style=\"margin:10px\"><div id=\"#bodyContent\">$message</div></body></html>";
 208+
 209+ }
 210+
 211+ # Send message or list recipients
 212+ $count = count($this->recipients);
 213+ if ($count > 0) {
 214+
 215+ # Set up new mailer instance if sending
 216+ if ($send) {
 217+ $mail = new PHPMailer();
 218+ $mail->From = $wgUser->isValidEmailAddr($wgUser->getEmail()) ? $wgUser->getEmail() : "wiki@$wgServer";
 219+ $mail->FromName = User::whoIsReal($wgUser->getId());
 220+ $mail->Subject = $this->subject;
 221+ $mail->Body = $message;
 222+ $mail->IsHTML(!$this->textonly);
 223+ }
 224+ else $msg = wfMsg('ea-listrecipients', $count);
 225+
 226+ # Loop through recipients sending or adding to list
 227+ foreach ($this->recipients as $recipient) $send ? $mail->AddAddress($recipient) : $msg .= "\n*[mailto:$recipient $recipient]";
 228+
 229+ if ($send) {
 230+ if ($state = $mail->Send()) $msg = wfMsg('ea-sent', $this->title, $count, $wgUser->getName());
 231+ else $msg = wfMsg('ea-error', $this->title, $mail->ErrorInfo);
 232+ }
 233+ else $state = $count;
 234+ }
 235+ else $msg = wfMsg('ea-error', $this->title, wfMsg('ea-norecipients'));
 236+
 237+ $wgOut->addWikiText($msg);
 238+ return $state;
 239+ }
 240+
 241+ /**
 242+ * Add a recipient the list
 243+ * - accepts title objects for page containing email address, or string of actual address
 244+ */
 245+ function addRecipient($recipient) {
 246+ if (is_object($recipient) && $recipient->exists()) {
 247+ $page = new Article($recipient);
 248+ if (preg_match('/[a-z0-9_.-]+@[a-z0-9_.-]+/i', $page->getContent(), $emails)) $recipient = $emails[0];
 249+ else $recipient = '';
 250+ }
 251+ if ($valid = User::isValidEmailAddr($recipient)) $this->recipients[] = $recipient;
 252+ return $valid;
 253+ }
 254+}
Property changes on: trunk/extensions/EmailPage/EmailPage_body.php
___________________________________________________________________
Added: svn:mergeinfo
Added: svn:eol-style
1255 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/ChangeLog.txt
@@ -0,0 +1,307 @@
 2+/*******************************************************************
 3+* The http://phpmailer.codeworxtech.com/ website now carries a few *
 4+* advertisements through the Google Adsense network. Please visit *
 5+* the advertiser sites and help us offset some of our costs. *
 6+* Thanks .... *
 7+********************************************************************/
 8+
 9+ChangeLog
 10+
 11+NOTE: THIS VERSION OF PHPMAILER IS DESIGNED FOR PHP5. IT WILL NOT WORK WITH PHP4.
 12+
 13+Version 2.1 (Wed, June 04 2008)
 14+
 15+** NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS.
 16+ IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE
 17+ APPRECIATED.
 18+
 19+* added S/MIME functionality (ability to digitally sign emails)
 20+ BIG THANKS TO "sergiocambra" for posting this patch back in November 2007.
 21+ The "Signed Emails" functionality adds the Sign method to pass the private key
 22+ filename and the password to read it, and then email will be sent with
 23+ content-type multipart/signed and with the digital signature attached.
 24+* fully compatible with E_STRICT error level
 25+ - Please note:
 26+ In about half the test environments this development version was subjected
 27+ to, an error was thrown for the date() functions used (line 1565 and 1569).
 28+ This is NOT a PHPMailer error, it is the result of an incorrectly configured
 29+ PHP5 installation. The fix is to modify your 'php.ini' file and include the
 30+ date.timezone = America/New York
 31+ directive, to your own server timezone
 32+ - If you do get this error, and are unable to access your php.ini file:
 33+ In your PHP script, add
 34+ date_default_timezone_set('America/Toronto');
 35+ - do not try to use
 36+ $myVar = date_default_timezone_get();
 37+ as a test, it will throw an error.
 38+* added ability to define path (mainly for embedded images)
 39+ function MsgHTML($message,$basedir='') ... where:
 40+ $basedir is the fully qualified path
 41+* fixed MsgHTML() function:
 42+ - Embedded Images where images are specified by <protocol>:// will not be altered or embedded
 43+* fixed the return value of SMTP exit code ( pclose )
 44+* addressed issue of multibyte characters in subject line and truncating
 45+* added ability to have user specified Message ID
 46+ (default is still that PHPMailer create a unique Message ID)
 47+* corrected unidentified message type to 'application/octet-stream'
 48+* fixed chunk_split() multibyte issue (thanks to Colin Brown, et al).
 49+* added check for added attachments
 50+* enhanced conversion of HTML to text in MsgHTML (thanks to "brunny")
 51+
 52+Version 2.1.0beta2 (Sun, Dec 02 2007)
 53+* implemented updated EncodeQP (thanks to coolbru, aka Marcus Bointon)
 54+* finished all testing, all known bugs corrected, enhancements tested
 55+- note: will NOT work with PHP4.
 56+
 57+please note, this is BETA software
 58+** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS
 59+INTENDED STRICTLY FOR TESTING
 60+
 61+Version 2.1.0beta1
 62+please note, this is BETA software
 63+** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS
 64+INTENDED STRICTLY FOR TESTING
 65+
 66+Version 2.0.0 rc2 (Fri, Nov 16 2007), interim release
 67+* implements new property to control VERP in class.smtp.php
 68+ example (requires instantiating class.smtp.php):
 69+ $mail->do_verp = true;
 70+* POP-before-SMTP functionality included, thanks to Richard Davey
 71+ (see class.pop3.php & pop3_before_smtp_test.php for examples)
 72+* included example showing how to use PHPMailer with GMAIL
 73+* fixed the missing Cc in SendMail() and Mail()
 74+
 75+******************
 76+A note on sending bulk emails:
 77+
 78+If the email you are sending is not personalized, consider using the
 79+"undisclosed-recipient:;" strategy. That is, put all of your recipients
 80+in the Bcc field and set the To field to "undisclosed-recipients:;".
 81+It's a lot faster (only one send) and saves quite a bit on resources.
 82+Contrary to some opinions, this will not get you listed in spam engines -
 83+it's a legitimate way for you to send emails.
 84+
 85+A partial example for use with PHPMailer:
 86+
 87+$mail->AddAddress("undisclosed-recipients:;");
 88+$mail->AddBCC("email1@anydomain.com,email2@anyotherdomain.com,email3@anyalternatedomain.com");
 89+
 90+Many email service providers restrict the number of emails that can be sent
 91+in any given time period. Often that is between 50 - 60 emails maximum
 92+per hour or per send session.
 93+
 94+If that's the case, then break up your Bcc lists into chunks that are one
 95+less than your limit, and put a pause in your script.
 96+*******************
 97+
 98+Version 2.0.0 rc1 (Thu, Nov 08 2007), interim release
 99+* dramatically simplified using inline graphics ... it's fully automated and requires no user input
 100+* added automatic document type detection for attachments and pictures
 101+* added MsgHTML() function to replace Body tag for HTML emails
 102+* fixed the SendMail security issues (input validation vulnerability)
 103+* enhanced the AddAddresses functionality so that the "Name" portion is used in the email address
 104+* removed the need to use the AltBody method (set from the HTML, or default text used)
 105+* set the PHP Mail() function as the default (still support SendMail, SMTP Mail)
 106+* removed the need to set the IsHTML property (set automatically)
 107+* added Estonian language file by Indrek P&auml;ri
 108+* added header injection patch
 109+* added "set" method to permit users to create their own pseudo-properties like 'X-Headers', etc.
 110+ example of use:
 111+ $mail->set('X-Priority', '3');
 112+ $mail->set('X-MSMail-Priority', 'Normal');
 113+* fixed warning message in SMTP get_lines method
 114+* added TLS/SSL SMTP support
 115+ example of use:
 116+ $mail = new PHPMailer();
 117+ $mail->Mailer = "smtp";
 118+ $mail->Host = "smtp.example.com";
 119+ $mail->SMTPSecure = "tls"; // option
 120+ //$mail->SMTPSecure = "ssl"; // option
 121+ ...
 122+ $mail->Send();
 123+* PHPMailer has been tested with PHP4 (4.4.7) and PHP5 (5.2.7)
 124+* Works with PHP installed as a module or as CGI-PHP
 125+- NOTE: will NOT work with PHP5 in E_STRICT error mode
 126+
 127+Version 1.73 (Sun, Jun 10 2005)
 128+* Fixed denial of service bug: http://www.cybsec.com/vuln/PHPMailer-DOS.pdf
 129+* Now has a total of 20 translations
 130+* Fixed alt attachments bug: http://tinyurl.com/98u9k
 131+
 132+Version 1.72 (Wed, May 25 2004)
 133+* Added Dutch, Swedish, Czech, Norwegian, and Turkish translations.
 134+* Received: Removed this method because spam filter programs like
 135+SpamAssassin reject this header.
 136+* Fixed error count bug.
 137+* SetLanguage default is now "language/".
 138+* Fixed magic_quotes_runtime bug.
 139+
 140+Version 1.71 (Tue, Jul 28 2003)
 141+* Made several speed enhancements
 142+* Added German and Italian translation files
 143+* Fixed HELO/AUTH bugs on keep-alive connects
 144+* Now provides an error message if language file does not load
 145+* Fixed attachment EOL bug
 146+* Updated some unclear documentation
 147+* Added additional tests and improved others
 148+
 149+Version 1.70 (Mon, Jun 20 2003)
 150+* Added SMTP keep-alive support
 151+* Added IsError method for error detection
 152+* Added error message translation support (SetLanguage)
 153+* Refactored many methods to increase library performance
 154+* Hello now sends the newer EHLO message before HELO as per RFC 2821
 155+* Removed the boundary class and replaced it with GetBoundary
 156+* Removed queue support methods
 157+* New $Hostname variable
 158+* New Message-ID header
 159+* Received header reformat
 160+* Helo variable default changed to $Hostname
 161+* Removed extra spaces in Content-Type definition (#667182)
 162+* Return-Path should be set to Sender when set
 163+* Adds Q or B encoding to headers when necessary
 164+* quoted-encoding should now encode NULs \000
 165+* Fixed encoding of body/AltBody (#553370)
 166+* Adds "To: undisclosed-recipients:;" when all recipients are hidden (BCC)
 167+* Multiple bug fixes
 168+
 169+Version 1.65 (Fri, Aug 09 2002)
 170+* Fixed non-visible attachment bug (#585097) for Outlook
 171+* SMTP connections are now closed after each transaction
 172+* Fixed SMTP::Expand return value
 173+* Converted SMTP class documentation to phpDocumentor format
 174+
 175+Version 1.62 (Wed, Jun 26 2002)
 176+* Fixed multi-attach bug
 177+* Set proper word wrapping
 178+* Reduced memory use with attachments
 179+* Added more debugging
 180+* Changed documentation to phpDocumentor format
 181+
 182+Version 1.60 (Sat, Mar 30 2002)
 183+* Sendmail pipe and address patch (Christian Holtje)
 184+* Added embedded image and read confirmation support (A. Ognio)
 185+* Added unit tests
 186+* Added SMTP timeout support (*nix only)
 187+* Added possibly temporary PluginDir variable for SMTP class
 188+* Added LE message line ending variable
 189+* Refactored boundary and attachment code
 190+* Eliminated SMTP class warnings
 191+* Added SendToQueue method for future queuing support
 192+
 193+Version 1.54 (Wed, Dec 19 2001)
 194+* Add some queuing support code
 195+* Fixed a pesky multi/alt bug
 196+* Messages are no longer forced to have "To" addresses
 197+
 198+Version 1.50 (Thu, Nov 08 2001)
 199+* Fix extra lines when not using SMTP mailer
 200+* Set WordWrap variable to int with a zero default
 201+
 202+Version 1.47 (Tue, Oct 16 2001)
 203+* Fixed Received header code format
 204+* Fixed AltBody order error
 205+* Fixed alternate port warning
 206+
 207+Version 1.45 (Tue, Sep 25 2001)
 208+* Added enhanced SMTP debug support
 209+* Added support for multiple ports on SMTP
 210+* Added Received header for tracing
 211+* Fixed AddStringAttachment encoding
 212+* Fixed possible header name quote bug
 213+* Fixed wordwrap() trim bug
 214+* Couple other small bug fixes
 215+
 216+Version 1.41 (Wed, Aug 22 2001)
 217+* Fixed AltBody bug w/o attachments
 218+* Fixed rfc_date() for certain mail servers
 219+
 220+Version 1.40 (Sun, Aug 12 2001)
 221+* Added multipart/alternative support (AltBody)
 222+* Documentation update
 223+* Fixed bug in Mercury MTA
 224+
 225+Version 1.29 (Fri, Aug 03 2001)
 226+* Added AddStringAttachment() method
 227+* Added SMTP authentication support
 228+
 229+Version 1.28 (Mon, Jul 30 2001)
 230+* Fixed a typo in SMTP class
 231+* Fixed header issue with Imail (win32) SMTP server
 232+* Made fopen() calls for attachments use "rb" to fix win32 error
 233+
 234+Version 1.25 (Mon, Jul 02 2001)
 235+* Added RFC 822 date fix (Patrice)
 236+* Added improved error handling by adding a $ErrorInfo variable
 237+* Removed MailerDebug variable (obsolete with new error handler)
 238+
 239+Version 1.20 (Mon, Jun 25 2001)
 240+* Added quoted-printable encoding (Patrice)
 241+* Set Version as public and removed PrintVersion()
 242+* Changed phpdoc to only display public variables and methods
 243+
 244+Version 1.19 (Thu, Jun 21 2001)
 245+* Fixed MS Mail header bug
 246+* Added fix for Bcc problem with mail(). *Does not work on Win32*
 247+ (See PHP bug report: http://www.php.net/bugs.php?id=11616)
 248+* mail() no longer passes a fifth parameter when not needed
 249+
 250+Version 1.15 (Fri, Jun 15 2001)
 251+[Note: these changes contributed by Patrice Fournier]
 252+* Changed all remaining \n to \r\n
 253+* Bcc: header no longer writen to message except
 254+when sent directly to sendmail
 255+* Added a small message to non-MIME compliant mail reader
 256+* Added Sender variable to change the Sender email
 257+used in -f for sendmail/mail and in 'MAIL FROM' for smtp mode
 258+* Changed boundary setting to a place it will be set only once
 259+* Removed transfer encoding for whole message when using multipart
 260+* Message body now uses Encoding in multipart messages
 261+* Can set encoding and type to attachments 7bit, 8bit
 262+and binary attachment are sent as is, base64 are encoded
 263+* Can set Encoding to base64 to send 8 bits body
 264+through 7 bits servers
 265+
 266+Version 1.10 (Tue, Jun 12 2001)
 267+* Fixed win32 mail header bug (printed out headers in message body)
 268+
 269+Version 1.09 (Fri, Jun 08 2001)
 270+* Changed date header to work with Netscape mail programs
 271+* Altered phpdoc documentation
 272+
 273+Version 1.08 (Tue, Jun 05 2001)
 274+* Added enhanced error-checking
 275+* Added phpdoc documentation to source
 276+
 277+Version 1.06 (Fri, Jun 01 2001)
 278+* Added optional name for file attachments
 279+
 280+Version 1.05 (Tue, May 29 2001)
 281+* Code cleanup
 282+* Eliminated sendmail header warning message
 283+* Fixed possible SMTP error
 284+
 285+Version 1.03 (Thu, May 24 2001)
 286+* Fixed problem where qmail sends out duplicate messages
 287+
 288+Version 1.02 (Wed, May 23 2001)
 289+* Added multiple recipient and attachment Clear* methods
 290+* Added Sendmail public variable
 291+* Fixed problem with loading SMTP library multiple times
 292+
 293+Version 0.98 (Tue, May 22 2001)
 294+* Fixed problem with redundant mail hosts sending out multiple messages
 295+* Added additional error handler code
 296+* Added AddCustomHeader() function
 297+* Added support for Microsoft mail client headers (affects priority)
 298+* Fixed small bug with Mailer variable
 299+* Added PrintVersion() function
 300+
 301+Version 0.92 (Tue, May 15 2001)
 302+* Changed file names to class.phpmailer.php and class.smtp.php to match
 303+ current PHP class trend.
 304+* Fixed problem where body not being printed when a message is attached
 305+* Several small bug fixes
 306+
 307+Version 0.90 (Tue, April 17 2001)
 308+* Intial public release
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/ChangeLog.txt
___________________________________________________________________
Added: svn:keywords
1309 + Id
Added: svn:eol-style
2310 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/docs/extending.html
@@ -0,0 +1,148 @@
 2+<html>
 3+<head>
 4+<title>Examples using phpmailer</title>
 5+</head>
 6+
 7+<body bgcolor="#FFFFFF">
 8+
 9+<h2>Examples using phpmailer</h2>
 10+
 11+<h3>1. Advanced Example</h3>
 12+<p>
 13+
 14+This demonstrates sending out multiple email messages with binary attachments
 15+from a MySQL database with multipart/alternative support.<p>
 16+<table cellpadding="4" border="1" width="80%">
 17+<tr>
 18+<td bgcolor="#CCCCCC">
 19+<pre>
 20+require("class.phpmailer.php");
 21+
 22+$mail = new phpmailer();
 23+
 24+$mail->From = "list@example.com";
 25+$mail->FromName = "List manager";
 26+$mail->Host = "smtp1.example.com;smtp2.example.com";
 27+$mail->Mailer = "smtp";
 28+
 29+@MYSQL_CONNECT("localhost","root","password");
 30+@mysql_select_db("my_company");
 31+$query� =�"SELECT full_name, email,�photo�FROM employee�WHERE�id=$id";
 32+$result�=�@MYSQL_QUERY($query);
 33+
 34+while ($row = mysql_fetch_array ($result))
 35+{
 36+ // HTML body
 37+ $body = "Hello &lt;font size=\"4\"&gt;" . $row["full_name"] . "&lt;/font&gt;, &lt;p&gt;";
 38+ $body .= "&lt;i&gt;Your&lt;/i&gt; personal photograph to this message.&lt;p&gt;";
 39+ $body .= "Sincerely, &lt;br&gt;";
 40+ $body .= "phpmailer List manager";
 41+
 42+ // Plain text body (for mail clients that cannot read HTML)
 43+ $text_body = "Hello " . $row["full_name"] . ", \n\n";
 44+ $text_body .= "Your personal photograph to this message.\n\n";
 45+ $text_body .= "Sincerely, \n";
 46+ $text_body .= "phpmailer List manager";
 47+
 48+ $mail->Body = $body;
 49+ $mail->AltBody = $text_body;
 50+ $mail->AddAddress($row["email"], $row["full_name"]);
 51+ $mail->AddStringAttachment($row["photo"], "YourPhoto.jpg");
 52+
 53+ if(!$mail->Send())
 54+ echo "There has been a mail error sending to " . $row["email"] . "&lt;br&gt;";
 55+
 56+ // Clear all addresses and attachments for next loop
 57+ $mail->ClearAddresses();
 58+ $mail->ClearAttachments();
 59+}
 60+</pre>
 61+</td>
 62+</tr>
 63+</table>
 64+<p>
 65+
 66+<h3>2. Extending phpmailer</h3>
 67+<p>
 68+
 69+Extending classes with inheritance is one of the most
 70+powerful features of object-oriented
 71+programming. It allows you to make changes to the
 72+original class for your
 73+own personal use without hacking the original
 74+classes. Plus, it is very
 75+easy to do. I've provided an example:
 76+
 77+<p>
 78+Here's a class that extends the phpmailer class and sets the defaults
 79+for the particular site:<br>
 80+PHP include file: <b>mail.inc.php</b>
 81+<p>
 82+
 83+<table cellpadding="4" border="1" width="80%">
 84+<tr>
 85+<td bgcolor="#CCCCCC">
 86+<pre>
 87+require("class.phpmailer.php");
 88+
 89+class my_phpmailer extends phpmailer {
 90+ // Set default variables for all new objects
 91+ var $From = "from@example.com";
 92+ var $FromName = "Mailer";
 93+ var $Host = "smtp1.example.com;smtp2.example.com";
 94+ var $Mailer = "smtp"; // Alternative to IsSMTP()
 95+ var $WordWrap = 75;
 96+
 97+ // Replace the default error_handler
 98+ function error_handler($msg) {
 99+ print("My Site Error");
 100+ print("Description:");
 101+ printf("%s", $msg);
 102+ exit;
 103+ }
 104+
 105+ // Create an additional function
 106+ function do_something($something) {
 107+ // Place your new code here
 108+ }
 109+}
 110+</td>
 111+</tr>
 112+</table>
 113+<br>
 114+
 115+Now here's a normal PHP page in the site, which will have all the defaults set
 116+above:<br>
 117+Normal PHP file: <b>mail_test.php</b>
 118+<p>
 119+
 120+<table cellpadding="4" border="1" width="80%">
 121+<tr>
 122+<td bgcolor="#CCCCCC">
 123+<pre>
 124+require("mail.inc.php");
 125+
 126+// Instantiate your new class
 127+$mail = new my_phpmailer;
 128+
 129+// Now you only need to add the necessary stuff
 130+$mail->AddAddress("josh@example.com", "Josh Adams");
 131+$mail->Subject = "Here is the subject";
 132+$mail->Body = "This is the message body";
 133+$mail->AddAttachment("c:/temp/11-10-00.zip", "new_name.zip"); // optional name
 134+
 135+if(!$mail->Send())
 136+{
 137+ echo "There was an error sending the message";
 138+ exit;
 139+}
 140+
 141+echo "Message was sent successfully";
 142+</pre>
 143+</td>
 144+</tr>
 145+</table>
 146+</p>
 147+
 148+</body>
 149+</html>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/docs/extending.html
___________________________________________________________________
Added: svn:eol-style
1150 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/docs/faq.html
@@ -0,0 +1,67 @@
 2+<html>
 3+<head>
 4+<title>PHPMailer FAQ</title>
 5+<style>
 6+body, p {
 7+ font-family: Arial, Helvetica, sans-serif;
 8+ font-size: 12px;
 9+}
 10+div.width {
 11+ width: 500px;
 12+ text-align: left;
 13+}
 14+</style>
 15+</head>
 16+<body bgcolor="#FFFFFF">
 17+<center>
 18+<div class="width">
 19+<h2>PHPMailer FAQ</h2>
 20+<ul>
 21+
 22+ <li><b style="background-color: #FFFF00">Q:</b> <b>I&#039;m using the SMTP mailer and I keep on getting a timeout message
 23+ well before the X seconds I set it for. What gives?</b><br />
 24+ <b style="background-color: #FFFF00">A:</b> PHP versions 4.0.4pl1 and earlier have a bug in which sockets timeout
 25+ early. You can fix this by re-compiling PHP 4.0.4pl1 with this fix:
 26+ <a href="timeoutfix.diff">timeoutfix.diff</a>. Otherwise you can wait for the new PHP release.<br /><br /></li>
 27+
 28+ <li><b style="background-color: #FFFF00">Q:</b> <b>I am concerned that using include files will take up too much
 29+ processing time on my computer. How can I make it run faster?</b><br />
 30+ <b style="background-color: #FFFF00">A:</b> PHP by itself is very fast. Much faster than ASP or JSP running on
 31+ the same type of server. This is because it has very little overhead compared
 32+ to its competitors and it pre-compiles all of
 33+ its code before it runs each script (in PHP4). However, all of
 34+ this compiling and re-compiling can take up a lot of valuable
 35+ computer resources. However, there are programs out there that compile
 36+ PHP code and store it in memory (or on mmaped files) to reduce the
 37+ processing immensely. Two of these: <a href="http://apc.communityconnect.com">APC
 38+ (Alternative PHP Cache)</a> and <a href="http://bwcache.bware.it/index.htm">Afterburner</a>
 39+ (<a href="http://www.mm4.de/php4win/mod_php4_win32/">Win32 download</a>)
 40+ are excellent free tools that do just this. If you have the money
 41+ you might also try <a href="http://www.zend.com">Zend Cache</a>, it is
 42+ even faster than the open source varieties. All of these tools make your
 43+ scripts run faster while also reducing the load on your server. I have tried
 44+ them myself and they are quite stable too.<br /><br /></li>
 45+
 46+ <li><b style="background-color: #FFFF00">Q:</b> <b>What mailer gives me the best performance?</b><br />
 47+ <b style="background-color: #FFFF00">A:</b> On a single machine the <b>sendmail (or Qmail)</b> is fastest overall.
 48+ Next fastest is mail() to give you the best performance. Both do not have the overhead of SMTP.
 49+ If you have you have your mail server on a another machine then
 50+ SMTP is your only option, but you do get the benefit of redundant mail servers.<br />
 51+ If you are running a mailing list with thousands of names, the fastest mailers in order are: SMTP, sendmail (or Qmail), mail().<br /><br /></li>
 52+
 53+ <li><b style="background-color: #FFFF00">Q:</b> <b>When I try to attach a file with on my server I get a
 54+ "Could not find {file} on filesystem error". Why is this?</b><br />
 55+ <b style="background-color: #FFFF00">A:</b> If you are using a Unix machine this is probably because the user
 56+ running your web server does not have read access to the directory in question. If you are using Windows,
 57+ then the problem probably is that you have used single backslashes to denote directories (\).
 58+ A single backslash has a special meaning to PHP so these are not
 59+ valid. Instead use double backslashes ("\\") or a single forward
 60+ slash ("/").<br /><br /></li>
 61+
 62+</ul>
 63+
 64+</div>
 65+</center>
 66+
 67+</body>
 68+</html>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/docs/faq.html
___________________________________________________________________
Added: svn:eol-style
169 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/docs/pop3_article.txt
@@ -0,0 +1,39 @@
 2+This is built for PHP Mailer 1.72 and was not tested with any previous version. It was developed under PHP 4.3.11 (E_ALL). It works under PHP 5 and 5.1 with E_ALL, but not in Strict mode due to var deprecation (but then neither does PHP Mailer either!). It follows the RFC 1939 standard explicitly and is fully commented.
 3+
 4+With that noted, here is how to implement it:
 5+Install the class file
 6+
 7+I didn't want to modify the PHP Mailer classes at all, so you will have to include/require this class along with the base one. It can sit quite happily in the phpmailer-1.72 directory:
 8+[geshi lang=php] require 'phpmailer-1.72/class.phpmailer.php'; require 'phpmailer-1.72/class.pop3.php'; [/geshi]
 9+When you need it, create your POP3 object
 10+
 11+Right before I invoke PHP Mailer I activate the POP3 authorisation. POP3 before SMTP is a process whereby you login to your web hosts POP3 mail server BEFORE sending out any emails via SMTP. The POP3 logon 'verifies' your ability to send email by SMTP, which typically otherwise blocks you. On my web host (Pair Networks) a single POP3 logon is enough to 'verify' you for 90 minutes. Here is some sample PHP code that activates the POP3 logon and then sends an email via PHP Mailer:
 12+[geshi lang=php] Authorise('pop3.example.com', 110, 30, 'mailer', 'password', 1); $mail = new PHPMailer(); $mail->SMTPDebug = 2; $mail->IsSMTP(); $mail->IsHTML(false); $mail->Host = 'relay.example.com'; $mail->From = 'mailer@example.com'; $mail->FromName = 'Example Mailer'; $mail->Subject = 'My subject'; $mail->Body = 'Hello world'; $mail->AddAddress('rich@corephp.co.uk', 'Richard Davey'); if (!$mail->Send()) { echo $mail->ErrorInfo; } ?> [/geshi]
 13+
 14+The PHP Mailer parts of this code should be obvious to anyone who has used PHP Mailer before. One thing to note - you almost certainly will not need to use SMTP Authentication *and* POP3 before SMTP together. The Authorisation method is a proxy method to all of the others within that class. There are Connect, Logon and Disconnect methods available, but I wrapped them in the single Authorisation one to make things easier.
 15+The Parameters
 16+
 17+The Authorise parameters are as follows:
 18+[geshi lang=php]$pop->Authorise('pop3.example.com', 110, 30, 'mailer', 'password', 1);[/geshi]
 19+
 20+ 1. pop3.example.com - The POP3 Mail Server Name (hostname or IP address)
 21+ 2. 110 - The POP3 Port on which to connect (default is usually 110, but check with your host)
 22+ 3. 30 - A connection time-out value (in seconds)
 23+ 4. mailer - The POP3 Username required to logon
 24+ 5. password - The POP3 Password required to logon
 25+ 6. 1 - The class debug level (0 = off, 1+ = debug output is echoed to the browser)
 26+
 27+Final Comments + the Download
 28+
 29+1) This class does not support APOP connections. This is only because I did not have an APOP server to test with, but if you'd like to see that added just contact me.
 30+
 31+2) Opening and closing lots of POP3 connections can be quite a resource/network drain. If you need to send a whole batch of emails then just perform the authentication once at the start, and then loop through your mail sending script. Providing this process doesn't take longer than the verification period lasts on your POP3 server, you should be fine. With my host that period is 90 minutes, i.e. plenty of time.
 32+
 33+3) If you have heavy requirements for this script (i.e. send a LOT of email on a frequent basis) then I would advise seeking out an alternative sending method (direct SMTP ideally). If this isn't possible then you could modify this class so the 'last authorised' date is recorded somewhere (MySQL, Flat file, etc) meaning you only open a new connection if the old one has expired, saving you precious overhead.
 34+
 35+4) There are lots of other POP3 classes for PHP available. However most of them implement the full POP3 command set, where-as this one is purely for authentication, and much lighter as a result. However using any of the other POP3 classes to just logon to your server would have the same net result. At the end of the day, use whatever method you feel most comfortable with.
 36+Download
 37+
 38+Here is the full class file plus my test script: POP_before_SMTP_PHPMailer.zip (4 KB) - Please note that it does not include PHPMailer itself.
 39+
 40+My thanks to Chris Ryan for the inspiration (even if indirectly, via his SMTP class)
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/docs/pop3_article.txt
___________________________________________________________________
Added: svn:eol-style
141 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/docs/use_gmail.txt
@@ -0,0 +1,45 @@
 2+<?php
 3+
 4+// example on using PHPMailer with GMAIL
 5+
 6+include("class.phpmailer.php");
 7+include("class.smtp.php"); // note, this is optional - gets called from main class if not already loaded
 8+
 9+$mail = new PHPMailer();
 10+
 11+$body = $mail->getFile('contents.html');
 12+$body = eregi_replace("[\]",'',$body);
 13+
 14+$mail->IsSMTP();
 15+$mail->SMTPAuth = true; // enable SMTP authentication
 16+$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
 17+$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
 18+$mail->Port = 465; // set the SMTP port
 19+
 20+$mail->Username = "yourname@gmail.com"; // GMAIL username
 21+$mail->Password = "password"; // GMAIL password
 22+
 23+$mail->From = "replyto@yourdomain.com";
 24+$mail->FromName = "Webmaster";
 25+$mail->Subject = "This is the subject";
 26+$mail->AltBody = "This is the body when user views in plain text format"; //Text Body
 27+$mail->WordWrap = 50; // set word wrap
 28+
 29+$mail->MsgHTML($body);
 30+
 31+$mail->AddReplyTo("replyto@yourdomain.com","Webmaster");
 32+
 33+$mail->AddAttachment("/path/to/file.zip"); // attachment
 34+$mail->AddAttachment("/path/to/image.jpg", "new.jpg"); // attachment
 35+
 36+$mail->AddAddress("username@domain.com","First Last");
 37+
 38+$mail->IsHTML(true); // send as HTML
 39+
 40+if(!$mail->Send()) {
 41+ echo "Mailer Error: " . $mail->ErrorInfo;
 42+} else {
 43+ echo "Message has been sent";
 44+}
 45+
 46+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/docs/use_gmail.txt
___________________________________________________________________
Added: svn:eol-style
147 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/class.phpmailer.php
@@ -0,0 +1,1886 @@
 2+<?php
 3+/*~ class.phpmailer.php
 4+.---------------------------------------------------------------------------.
 5+| Software: PHPMailer - PHP email class |
 6+| Version: 2.1 |
 7+| Contact: via sourceforge.net support pages (also www.codeworxtech.com) |
 8+| Info: http://phpmailer.sourceforge.net |
 9+| Support: http://sourceforge.net/projects/phpmailer/ |
 10+| ------------------------------------------------------------------------- |
 11+| Author: Andy Prevost (project admininistrator) |
 12+| Author: Brent R. Matzelle (original founder) |
 13+| Copyright (c) 2004-2007, Andy Prevost. All Rights Reserved. |
 14+| Copyright (c) 2001-2003, Brent R. Matzelle |
 15+| ------------------------------------------------------------------------- |
 16+| License: Distributed under the Lesser General Public License (LGPL) |
 17+| http://www.gnu.org/copyleft/lesser.html |
 18+| This program is distributed in the hope that it will be useful - WITHOUT |
 19+| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
 20+| FITNESS FOR A PARTICULAR PURPOSE. |
 21+| ------------------------------------------------------------------------- |
 22+| We offer a number of paid services (www.codeworxtech.com): |
 23+| - Web Hosting on highly optimized fast and secure servers |
 24+| - Technology Consulting |
 25+| - Oursourcing (highly qualified programmers and graphic designers) |
 26+'---------------------------------------------------------------------------'
 27+
 28+/**
 29+ * PHPMailer - PHP email transport class
 30+ * NOTE: Designed for use with PHP version 5 and up
 31+ * @package PHPMailer
 32+ * @author Andy Prevost
 33+ * @copyright 2004 - 2008 Andy Prevost
 34+ */
 35+
 36+class PHPMailer {
 37+
 38+ /////////////////////////////////////////////////
 39+ // PROPERTIES, PUBLIC
 40+ /////////////////////////////////////////////////
 41+
 42+ /**
 43+ * Email priority (1 = High, 3 = Normal, 5 = low).
 44+ * @var int
 45+ */
 46+ public $Priority = 3;
 47+
 48+ /**
 49+ * Sets the CharSet of the message.
 50+ * @var string
 51+ */
 52+ public $CharSet = 'iso-8859-1';
 53+
 54+ /**
 55+ * Sets the Content-type of the message.
 56+ * @var string
 57+ */
 58+ public $ContentType = 'text/plain';
 59+
 60+ /**
 61+ * Sets the Encoding of the message. Options for this are "8bit",
 62+ * "7bit", "binary", "base64", and "quoted-printable".
 63+ * @var string
 64+ */
 65+ public $Encoding = '8bit';
 66+
 67+ /**
 68+ * Holds the most recent mailer error message.
 69+ * @var string
 70+ */
 71+ public $ErrorInfo = '';
 72+
 73+ /**
 74+ * Sets the From email address for the message.
 75+ * @var string
 76+ */
 77+ public $From = 'root@localhost';
 78+
 79+ /**
 80+ * Sets the From name of the message.
 81+ * @var string
 82+ */
 83+ public $FromName = 'Root User';
 84+
 85+ /**
 86+ * Sets the Sender email (Return-Path) of the message. If not empty,
 87+ * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
 88+ * @var string
 89+ */
 90+ public $Sender = '';
 91+
 92+ /**
 93+ * Sets the Subject of the message.
 94+ * @var string
 95+ */
 96+ public $Subject = '';
 97+
 98+ /**
 99+ * Sets the Body of the message. This can be either an HTML or text body.
 100+ * If HTML then run IsHTML(true).
 101+ * @var string
 102+ */
 103+ public $Body = '';
 104+
 105+ /**
 106+ * Sets the text-only body of the message. This automatically sets the
 107+ * email to multipart/alternative. This body can be read by mail
 108+ * clients that do not have HTML email capability such as mutt. Clients
 109+ * that can read HTML will view the normal Body.
 110+ * @var string
 111+ */
 112+ public $AltBody = '';
 113+
 114+ /**
 115+ * Sets word wrapping on the body of the message to a given number of
 116+ * characters.
 117+ * @var int
 118+ */
 119+ public $WordWrap = 0;
 120+
 121+ /**
 122+ * Method to send mail: ("mail", "sendmail", or "smtp").
 123+ * @var string
 124+ */
 125+ public $Mailer = 'mail';
 126+
 127+ /**
 128+ * Sets the path of the sendmail program.
 129+ * @var string
 130+ */
 131+ public $Sendmail = '/usr/sbin/sendmail';
 132+
 133+ /**
 134+ * Path to PHPMailer plugins. This is now only useful if the SMTP class
 135+ * is in a different directory than the PHP include path.
 136+ * @var string
 137+ */
 138+ public $PluginDir = '';
 139+
 140+ /**
 141+ * Holds PHPMailer version.
 142+ * @var string
 143+ */
 144+ public $Version = "2.1";
 145+
 146+ /**
 147+ * Sets the email address that a reading confirmation will be sent.
 148+ * @var string
 149+ */
 150+ public $ConfirmReadingTo = '';
 151+
 152+ /**
 153+ * Sets the hostname to use in Message-Id and Received headers
 154+ * and as default HELO string. If empty, the value returned
 155+ * by SERVER_NAME is used or 'localhost.localdomain'.
 156+ * @var string
 157+ */
 158+ public $Hostname = '';
 159+
 160+ /**
 161+ * Sets the message ID to be used in the Message-Id header.
 162+ * If empty, a unique id will be generated.
 163+ * @var string
 164+ */
 165+ public $MessageID = '';
 166+
 167+ /////////////////////////////////////////////////
 168+ // PROPERTIES FOR SMTP
 169+ /////////////////////////////////////////////////
 170+
 171+ /**
 172+ * Sets the SMTP hosts. All hosts must be separated by a
 173+ * semicolon. You can also specify a different port
 174+ * for each host by using this format: [hostname:port]
 175+ * (e.g. "smtp1.example.com:25;smtp2.example.com").
 176+ * Hosts will be tried in order.
 177+ * @var string
 178+ */
 179+ public $Host = 'localhost';
 180+
 181+ /**
 182+ * Sets the default SMTP server port.
 183+ * @var int
 184+ */
 185+ public $Port = 25;
 186+
 187+ /**
 188+ * Sets the SMTP HELO of the message (Default is $Hostname).
 189+ * @var string
 190+ */
 191+ public $Helo = '';
 192+
 193+ /**
 194+ * Sets connection prefix.
 195+ * Options are "", "ssl" or "tls"
 196+ * @var string
 197+ */
 198+ public $SMTPSecure = "";
 199+
 200+ /**
 201+ * Sets SMTP authentication. Utilizes the Username and Password variables.
 202+ * @var bool
 203+ */
 204+ public $SMTPAuth = false;
 205+
 206+ /**
 207+ * Sets SMTP username.
 208+ * @var string
 209+ */
 210+ public $Username = '';
 211+
 212+ /**
 213+ * Sets SMTP password.
 214+ * @var string
 215+ */
 216+ public $Password = '';
 217+
 218+ /**
 219+ * Sets the SMTP server timeout in seconds. This function will not
 220+ * work with the win32 version.
 221+ * @var int
 222+ */
 223+ public $Timeout = 10;
 224+
 225+ /**
 226+ * Sets SMTP class debugging on or off.
 227+ * @var bool
 228+ */
 229+ public $SMTPDebug = false;
 230+
 231+ /**
 232+ * Prevents the SMTP connection from being closed after each mail
 233+ * sending. If this is set to true then to close the connection
 234+ * requires an explicit call to SmtpClose().
 235+ * @var bool
 236+ */
 237+ public $SMTPKeepAlive = false;
 238+
 239+ /**
 240+ * Provides the ability to have the TO field process individual
 241+ * emails, instead of sending to entire TO addresses
 242+ * @var bool
 243+ */
 244+ public $SingleTo = false;
 245+
 246+ /////////////////////////////////////////////////
 247+ // PROPERTIES, PRIVATE
 248+ /////////////////////////////////////////////////
 249+
 250+ private $smtp = NULL;
 251+ private $to = array();
 252+ private $cc = array();
 253+ private $bcc = array();
 254+ private $ReplyTo = array();
 255+ private $attachment = array();
 256+ private $CustomHeader = array();
 257+ private $message_type = '';
 258+ private $boundary = array();
 259+ private $language = array();
 260+ private $error_count = 0;
 261+ private $LE = "\n";
 262+ private $sign_key_file = "";
 263+ private $sign_key_pass = "";
 264+
 265+ /////////////////////////////////////////////////
 266+ // METHODS, VARIABLES
 267+ /////////////////////////////////////////////////
 268+
 269+ /**
 270+ * Sets message type to HTML.
 271+ * @param bool $bool
 272+ * @return void
 273+ */
 274+ public function IsHTML($bool) {
 275+ if($bool == true) {
 276+ $this->ContentType = 'text/html';
 277+ } else {
 278+ $this->ContentType = 'text/plain';
 279+ }
 280+ }
 281+
 282+ /**
 283+ * Sets Mailer to send message using SMTP.
 284+ * @return void
 285+ */
 286+ public function IsSMTP() {
 287+ $this->Mailer = 'smtp';
 288+ }
 289+
 290+ /**
 291+ * Sets Mailer to send message using PHP mail() function.
 292+ * @return void
 293+ */
 294+ public function IsMail() {
 295+ $this->Mailer = 'mail';
 296+ }
 297+
 298+ /**
 299+ * Sets Mailer to send message using the $Sendmail program.
 300+ * @return void
 301+ */
 302+ public function IsSendmail() {
 303+ $this->Mailer = 'sendmail';
 304+ }
 305+
 306+ /**
 307+ * Sets Mailer to send message using the qmail MTA.
 308+ * @return void
 309+ */
 310+ public function IsQmail() {
 311+ $this->Sendmail = '/var/qmail/bin/sendmail';
 312+ $this->Mailer = 'sendmail';
 313+ }
 314+
 315+ /////////////////////////////////////////////////
 316+ // METHODS, RECIPIENTS
 317+ /////////////////////////////////////////////////
 318+
 319+ /**
 320+ * Adds a "To" address.
 321+ * @param string $address
 322+ * @param string $name
 323+ * @return void
 324+ */
 325+ public function AddAddress($address, $name = '') {
 326+ $cur = count($this->to);
 327+ $this->to[$cur][0] = trim($address);
 328+ $this->to[$cur][1] = $name;
 329+ }
 330+
 331+ /**
 332+ * Adds a "Cc" address. Note: this function works
 333+ * with the SMTP mailer on win32, not with the "mail"
 334+ * mailer.
 335+ * @param string $address
 336+ * @param string $name
 337+ * @return void
 338+ */
 339+ public function AddCC($address, $name = '') {
 340+ $cur = count($this->cc);
 341+ $this->cc[$cur][0] = trim($address);
 342+ $this->cc[$cur][1] = $name;
 343+ }
 344+
 345+ /**
 346+ * Adds a "Bcc" address. Note: this function works
 347+ * with the SMTP mailer on win32, not with the "mail"
 348+ * mailer.
 349+ * @param string $address
 350+ * @param string $name
 351+ * @return void
 352+ */
 353+ public function AddBCC($address, $name = '') {
 354+ $cur = count($this->bcc);
 355+ $this->bcc[$cur][0] = trim($address);
 356+ $this->bcc[$cur][1] = $name;
 357+ }
 358+
 359+ /**
 360+ * Adds a "Reply-to" address.
 361+ * @param string $address
 362+ * @param string $name
 363+ * @return void
 364+ */
 365+ public function AddReplyTo($address, $name = '') {
 366+ $cur = count($this->ReplyTo);
 367+ $this->ReplyTo[$cur][0] = trim($address);
 368+ $this->ReplyTo[$cur][1] = $name;
 369+ }
 370+
 371+ /////////////////////////////////////////////////
 372+ // METHODS, MAIL SENDING
 373+ /////////////////////////////////////////////////
 374+
 375+ /**
 376+ * Creates message and assigns Mailer. If the message is
 377+ * not sent successfully then it returns false. Use the ErrorInfo
 378+ * variable to view description of the error.
 379+ * @return bool
 380+ */
 381+ public function Send() {
 382+ $header = '';
 383+ $body = '';
 384+ $result = true;
 385+
 386+ if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) {
 387+ $this->SetError($this->Lang('provide_address'));
 388+ return false;
 389+ }
 390+
 391+ /* Set whether the message is multipart/alternative */
 392+ if(!empty($this->AltBody)) {
 393+ $this->ContentType = 'multipart/alternative';
 394+ }
 395+
 396+ $this->error_count = 0; // reset errors
 397+ $this->SetMessageType();
 398+ $header .= $this->CreateHeader();
 399+ $body = $this->CreateBody();
 400+
 401+ if($body == '') {
 402+ return false;
 403+ }
 404+
 405+ /* Choose the mailer */
 406+ switch($this->Mailer) {
 407+ case 'sendmail':
 408+ $result = $this->SendmailSend($header, $body);
 409+ break;
 410+ case 'smtp':
 411+ $result = $this->SmtpSend($header, $body);
 412+ break;
 413+ case 'mail':
 414+ $result = $this->MailSend($header, $body);
 415+ break;
 416+ default:
 417+ $result = $this->MailSend($header, $body);
 418+ break;
 419+ //$this->SetError($this->Mailer . $this->Lang('mailer_not_supported'));
 420+ //$result = false;
 421+ //break;
 422+ }
 423+
 424+ return $result;
 425+ }
 426+
 427+ /**
 428+ * Sends mail using the $Sendmail program.
 429+ * @access public
 430+ * @return bool
 431+ */
 432+ public function SendmailSend($header, $body) {
 433+ if ($this->Sender != '') {
 434+ $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
 435+ } else {
 436+ $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail));
 437+ }
 438+
 439+ if(!@$mail = popen($sendmail, 'w')) {
 440+ $this->SetError($this->Lang('execute') . $this->Sendmail);
 441+ return false;
 442+ }
 443+
 444+ fputs($mail, $header);
 445+ fputs($mail, $body);
 446+
 447+ $result = pclose($mail);
 448+ if (version_compare(phpversion(), '4.2.3') == -1) {
 449+ $result = $result >> 8 & 0xFF;
 450+ }
 451+ if($result != 0) {
 452+ $this->SetError($this->Lang('execute') . $this->Sendmail);
 453+ return false;
 454+ }
 455+
 456+ return true;
 457+ }
 458+
 459+ /**
 460+ * Sends mail using the PHP mail() function.
 461+ * @access public
 462+ * @return bool
 463+ */
 464+ public function MailSend($header, $body) {
 465+
 466+ $to = '';
 467+ for($i = 0; $i < count($this->to); $i++) {
 468+ if($i != 0) { $to .= ', '; }
 469+ $to .= $this->AddrFormat($this->to[$i]);
 470+ }
 471+
 472+ $toArr = split(',', $to);
 473+
 474+ $params = sprintf("-oi -f %s", $this->Sender);
 475+ if ($this->Sender != '' && strlen(ini_get('safe_mode'))< 1) {
 476+ $old_from = ini_get('sendmail_from');
 477+ ini_set('sendmail_from', $this->Sender);
 478+ if ($this->SingleTo === true && count($toArr) > 1) {
 479+ foreach ($toArr as $key => $val) {
 480+ $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
 481+ }
 482+ } else {
 483+ $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
 484+ }
 485+ } else {
 486+ if ($this->SingleTo === true && count($toArr) > 1) {
 487+ foreach ($toArr as $key => $val) {
 488+ $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
 489+ }
 490+ } else {
 491+ $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header);
 492+ }
 493+ }
 494+
 495+ if (isset($old_from)) {
 496+ ini_set('sendmail_from', $old_from);
 497+ }
 498+
 499+ if(!$rt) {
 500+ $this->SetError($this->Lang('instantiate'));
 501+ return false;
 502+ }
 503+
 504+ return true;
 505+ }
 506+
 507+ /**
 508+ * Sends mail via SMTP using PhpSMTP (Author:
 509+ * Chris Ryan). Returns bool. Returns false if there is a
 510+ * bad MAIL FROM, RCPT, or DATA input.
 511+ * @access public
 512+ * @return bool
 513+ */
 514+ public function SmtpSend($header, $body) {
 515+ include_once($this->PluginDir . 'class.smtp.php');
 516+ $error = '';
 517+ $bad_rcpt = array();
 518+
 519+ if(!$this->SmtpConnect()) {
 520+ return false;
 521+ }
 522+
 523+ $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender;
 524+ if(!$this->smtp->Mail($smtp_from)) {
 525+ $error = $this->Lang('from_failed') . $smtp_from;
 526+ $this->SetError($error);
 527+ $this->smtp->Reset();
 528+ return false;
 529+ }
 530+
 531+ /* Attempt to send attach all recipients */
 532+ for($i = 0; $i < count($this->to); $i++) {
 533+ if(!$this->smtp->Recipient($this->to[$i][0])) {
 534+ $bad_rcpt[] = $this->to[$i][0];
 535+ }
 536+ }
 537+ for($i = 0; $i < count($this->cc); $i++) {
 538+ if(!$this->smtp->Recipient($this->cc[$i][0])) {
 539+ $bad_rcpt[] = $this->cc[$i][0];
 540+ }
 541+ }
 542+ for($i = 0; $i < count($this->bcc); $i++) {
 543+ if(!$this->smtp->Recipient($this->bcc[$i][0])) {
 544+ $bad_rcpt[] = $this->bcc[$i][0];
 545+ }
 546+ }
 547+
 548+ if(count($bad_rcpt) > 0) { // Create error message
 549+ for($i = 0; $i < count($bad_rcpt); $i++) {
 550+ if($i != 0) {
 551+ $error .= ', ';
 552+ }
 553+ $error .= $bad_rcpt[$i];
 554+ }
 555+ $error = $this->Lang('recipients_failed') . $error;
 556+ $this->SetError($error);
 557+ $this->smtp->Reset();
 558+ return false;
 559+ }
 560+
 561+ if(!$this->smtp->Data($header . $body)) {
 562+ $this->SetError($this->Lang('data_not_accepted'));
 563+ $this->smtp->Reset();
 564+ return false;
 565+ }
 566+ if($this->SMTPKeepAlive == true) {
 567+ $this->smtp->Reset();
 568+ } else {
 569+ $this->SmtpClose();
 570+ }
 571+
 572+ return true;
 573+ }
 574+
 575+ /**
 576+ * Initiates a connection to an SMTP server. Returns false if the
 577+ * operation failed.
 578+ * @access public
 579+ * @return bool
 580+ */
 581+ public function SmtpConnect() {
 582+ if($this->smtp == NULL) {
 583+ $this->smtp = new SMTP();
 584+ }
 585+
 586+ $this->smtp->do_debug = $this->SMTPDebug;
 587+ $hosts = explode(';', $this->Host);
 588+ $index = 0;
 589+ $connection = ($this->smtp->Connected());
 590+
 591+ /* Retry while there is no connection */
 592+ while($index < count($hosts) && $connection == false) {
 593+ $hostinfo = array();
 594+ if(eregi('^(.+):([0-9]+)$', $hosts[$index], $hostinfo)) {
 595+ $host = $hostinfo[1];
 596+ $port = $hostinfo[2];
 597+ } else {
 598+ $host = $hosts[$index];
 599+ $port = $this->Port;
 600+ }
 601+
 602+ $tls = ($this->SMTPSecure == 'tls');
 603+ $ssl = ($this->SMTPSecure == 'ssl');
 604+
 605+ if($this->smtp->Connect(($ssl ? 'ssl://':'').$host, $port, $this->Timeout)) {
 606+
 607+ $hello = ($this->Helo != '' ? $this->Hello : $this->ServerHostname());
 608+ $this->smtp->Hello($hello);
 609+
 610+ if($tls) {
 611+ if(!$this->smtp->StartTLS()) {
 612+ $this->SetError($this->Lang("tls"));
 613+ $this->smtp->Reset();
 614+ $connection = false;
 615+ }
 616+
 617+ //We must resend HELLO after tls negociation
 618+ $this->smtp->Hello($hello);
 619+ }
 620+
 621+ $connection = true;
 622+ if($this->SMTPAuth) {
 623+ if(!$this->smtp->Authenticate($this->Username, $this->Password)) {
 624+ $this->SetError($this->Lang('authenticate'));
 625+ $this->smtp->Reset();
 626+ $connection = false;
 627+ }
 628+ }
 629+ }
 630+ $index++;
 631+ }
 632+ if(!$connection) {
 633+ $this->SetError($this->Lang('connect_host'));
 634+ }
 635+
 636+ return $connection;
 637+ }
 638+
 639+ /**
 640+ * Closes the active SMTP session if one exists.
 641+ * @return void
 642+ */
 643+ public function SmtpClose() {
 644+ if($this->smtp != NULL) {
 645+ if($this->smtp->Connected()) {
 646+ $this->smtp->Quit();
 647+ $this->smtp->Close();
 648+ }
 649+ }
 650+ }
 651+
 652+ /**
 653+ * Sets the language for all class error messages. Returns false
 654+ * if it cannot load the language file. The default language type
 655+ * is English.
 656+ * @param string $lang_type Type of language (e.g. Portuguese: "br")
 657+ * @param string $lang_path Path to the language file directory
 658+ * @access public
 659+ * @return bool
 660+ */
 661+ function SetLanguage($lang_type = 'en', $lang_path = 'language/') {
 662+ if( !(@include $lang_path.'phpmailer.lang-'.$lang_type.'.php') ) {
 663+ $this->SetError('Could not load language file');
 664+ return false;
 665+ }
 666+ $this->language = $PHPMAILER_LANG;
 667+ return true;
 668+ }
 669+
 670+ /////////////////////////////////////////////////
 671+ // METHODS, MESSAGE CREATION
 672+ /////////////////////////////////////////////////
 673+
 674+ /**
 675+ * Creates recipient headers.
 676+ * @access public
 677+ * @return string
 678+ */
 679+ public function AddrAppend($type, $addr) {
 680+ $addr_str = $type . ': ';
 681+ $addr_str .= $this->AddrFormat($addr[0]);
 682+ if(count($addr) > 1) {
 683+ for($i = 1; $i < count($addr); $i++) {
 684+ $addr_str .= ', ' . $this->AddrFormat($addr[$i]);
 685+ }
 686+ }
 687+ $addr_str .= $this->LE;
 688+
 689+ return $addr_str;
 690+ }
 691+
 692+ /**
 693+ * Formats an address correctly.
 694+ * @access public
 695+ * @return string
 696+ */
 697+ public function AddrFormat($addr) {
 698+ if(empty($addr[1])) {
 699+ $formatted = $this->SecureHeader($addr[0]);
 700+ } else {
 701+ $formatted = $this->EncodeHeader($this->SecureHeader($addr[1]), 'phrase') . " <" . $this->SecureHeader($addr[0]) . ">";
 702+ }
 703+
 704+ return $formatted;
 705+ }
 706+
 707+ /**
 708+ * Wraps message for use with mailers that do not
 709+ * automatically perform wrapping and for quoted-printable.
 710+ * Original written by philippe.
 711+ * @access public
 712+ * @return string
 713+ */
 714+ public function WrapText($message, $length, $qp_mode = false) {
 715+ $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE;
 716+ // If utf-8 encoding is used, we will need to make sure we don't
 717+ // split multibyte characters when we wrap
 718+ $is_utf8 = (strtolower($this->CharSet) == "utf-8");
 719+
 720+ $message = $this->FixEOL($message);
 721+ if (substr($message, -1) == $this->LE) {
 722+ $message = substr($message, 0, -1);
 723+ }
 724+
 725+ $line = explode($this->LE, $message);
 726+ $message = '';
 727+ for ($i=0 ;$i < count($line); $i++) {
 728+ $line_part = explode(' ', $line[$i]);
 729+ $buf = '';
 730+ for ($e = 0; $e<count($line_part); $e++) {
 731+ $word = $line_part[$e];
 732+ if ($qp_mode and (strlen($word) > $length)) {
 733+ $space_left = $length - strlen($buf) - 1;
 734+ if ($e != 0) {
 735+ if ($space_left > 20) {
 736+ $len = $space_left;
 737+ if ($is_utf8) {
 738+ $len = $this->UTF8CharBoundary($word, $len);
 739+ } elseif (substr($word, $len - 1, 1) == "=") {
 740+ $len--;
 741+ } elseif (substr($word, $len - 2, 1) == "=") {
 742+ $len -= 2;
 743+ }
 744+ $part = substr($word, 0, $len);
 745+ $word = substr($word, $len);
 746+ $buf .= ' ' . $part;
 747+ $message .= $buf . sprintf("=%s", $this->LE);
 748+ } else {
 749+ $message .= $buf . $soft_break;
 750+ }
 751+ $buf = '';
 752+ }
 753+ while (strlen($word) > 0) {
 754+ $len = $length;
 755+ if ($is_utf8) {
 756+ $len = $this->UTF8CharBoundary($word, $len);
 757+ } elseif (substr($word, $len - 1, 1) == "=") {
 758+ $len--;
 759+ } elseif (substr($word, $len - 2, 1) == "=") {
 760+ $len -= 2;
 761+ }
 762+ $part = substr($word, 0, $len);
 763+ $word = substr($word, $len);
 764+
 765+ if (strlen($word) > 0) {
 766+ $message .= $part . sprintf("=%s", $this->LE);
 767+ } else {
 768+ $buf = $part;
 769+ }
 770+ }
 771+ } else {
 772+ $buf_o = $buf;
 773+ $buf .= ($e == 0) ? $word : (' ' . $word);
 774+
 775+ if (strlen($buf) > $length and $buf_o != '') {
 776+ $message .= $buf_o . $soft_break;
 777+ $buf = $word;
 778+ }
 779+ }
 780+ }
 781+ $message .= $buf . $this->LE;
 782+ }
 783+
 784+ return $message;
 785+ }
 786+
 787+ /**
 788+ * Finds last character boundary prior to maxLength in a utf-8
 789+ * quoted (printable) encoded string.
 790+ * Original written by Colin Brown.
 791+ * @access public
 792+ * @param string $encodedText utf-8 QP text
 793+ * @param int $maxLength find last character boundary prior to this length
 794+ * @return int
 795+ */
 796+ public function UTF8CharBoundary($encodedText, $maxLength) {
 797+ $foundSplitPos = false;
 798+ $lookBack = 3;
 799+ while (!$foundSplitPos) {
 800+ $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack);
 801+ $encodedCharPos = strpos($lastChunk, "=");
 802+ if ($encodedCharPos !== false) {
 803+ // Found start of encoded character byte within $lookBack block.
 804+ // Check the encoded byte value (the 2 chars after the '=')
 805+ $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2);
 806+ $dec = hexdec($hex);
 807+ if ($dec < 128) { // Single byte character.
 808+ // If the encoded char was found at pos 0, it will fit
 809+ // otherwise reduce maxLength to start of the encoded char
 810+ $maxLength = ($encodedCharPos == 0) ? $maxLength :
 811+ $maxLength - ($lookBack - $encodedCharPos);
 812+ $foundSplitPos = true;
 813+ } elseif ($dec >= 192) { // First byte of a multi byte character
 814+ // Reduce maxLength to split at start of character
 815+ $maxLength = $maxLength - ($lookBack - $encodedCharPos);
 816+ $foundSplitPos = true;
 817+ } elseif ($dec < 192) { // Middle byte of a multi byte character, look further back
 818+ $lookBack += 3;
 819+ }
 820+ } else {
 821+ // No encoded character found
 822+ $foundSplitPos = true;
 823+ }
 824+ }
 825+ return $maxLength;
 826+ }
 827+
 828+
 829+ /**
 830+ * Set the body wrapping.
 831+ * @access public
 832+ * @return void
 833+ */
 834+ public function SetWordWrap() {
 835+ if($this->WordWrap < 1) {
 836+ return;
 837+ }
 838+
 839+ switch($this->message_type) {
 840+ case 'alt':
 841+ /* fall through */
 842+ case 'alt_attachments':
 843+ $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap);
 844+ break;
 845+ default:
 846+ $this->Body = $this->WrapText($this->Body, $this->WordWrap);
 847+ break;
 848+ }
 849+ }
 850+
 851+ /**
 852+ * Assembles message header.
 853+ * @access public
 854+ * @return string
 855+ */
 856+ public function CreateHeader() {
 857+ $result = '';
 858+
 859+ /* Set the boundaries */
 860+ $uniq_id = md5(uniqid(time()));
 861+ $this->boundary[1] = 'b1_' . $uniq_id;
 862+ $this->boundary[2] = 'b2_' . $uniq_id;
 863+
 864+ $result .= $this->HeaderLine('Date', $this->RFCDate());
 865+ if($this->Sender == '') {
 866+ $result .= $this->HeaderLine('Return-Path', trim($this->From));
 867+ } else {
 868+ $result .= $this->HeaderLine('Return-Path', trim($this->Sender));
 869+ }
 870+
 871+ /* To be created automatically by mail() */
 872+ if($this->Mailer != 'mail') {
 873+ if(count($this->to) > 0) {
 874+ $result .= $this->AddrAppend('To', $this->to);
 875+ } elseif (count($this->cc) == 0) {
 876+ $result .= $this->HeaderLine('To', 'undisclosed-recipients:;');
 877+ }
 878+ if(count($this->cc) > 0) {
 879+ $result .= $this->AddrAppend('Cc', $this->cc);
 880+ }
 881+ }
 882+
 883+ $from = array();
 884+ $from[0][0] = trim($this->From);
 885+ $from[0][1] = $this->FromName;
 886+ $result .= $this->AddrAppend('From', $from);
 887+
 888+ /* sendmail and mail() extract Cc from the header before sending */
 889+ if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) && (count($this->cc) > 0)) {
 890+ $result .= $this->AddrAppend('Cc', $this->cc);
 891+ }
 892+
 893+ /* sendmail and mail() extract Bcc from the header before sending */
 894+ if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) && (count($this->bcc) > 0)) {
 895+ $result .= $this->AddrAppend('Bcc', $this->bcc);
 896+ }
 897+
 898+ if(count($this->ReplyTo) > 0) {
 899+ $result .= $this->AddrAppend('Reply-to', $this->ReplyTo);
 900+ }
 901+
 902+ /* mail() sets the subject itself */
 903+ if($this->Mailer != 'mail') {
 904+ $result .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader($this->Subject)));
 905+ }
 906+
 907+ if($this->MessageID != '') {
 908+ $result .= $this->HeaderLine('Message-ID',$this->MessageID);
 909+ } else {
 910+ $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE);
 911+ }
 912+ $result .= $this->HeaderLine('X-Priority', $this->Priority);
 913+ $result .= $this->HeaderLine('X-Mailer', 'PHPMailer (phpmailer.codeworxtech.com) [version ' . $this->Version . ']');
 914+
 915+ if($this->ConfirmReadingTo != '') {
 916+ $result .= $this->HeaderLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>');
 917+ }
 918+
 919+ // Add custom headers
 920+ for($index = 0; $index < count($this->CustomHeader); $index++) {
 921+ $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1])));
 922+ }
 923+ //$result .= $this->HeaderLine('MIME-Version', '1.0');
 924+ if (!$this->sign_key_file) {
 925+ $result .= $this->HeaderLine('MIME-Version', '1.0');
 926+ $result .= $this->GetMailMIME();
 927+ }
 928+
 929+ return $result;
 930+ }
 931+
 932+ /**
 933+ * Returns the message MIME.
 934+ * @access public
 935+ * @return string
 936+ */
 937+ public function GetMailMIME() {
 938+ $result = '';
 939+ switch($this->message_type) {
 940+ case 'plain':
 941+ $result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding);
 942+ $result .= sprintf("Content-Type: %s; charset=\"%s\"", $this->ContentType, $this->CharSet);
 943+ break;
 944+ case 'attachments':
 945+ /* fall through */
 946+ case 'alt_attachments':
 947+ if($this->InlineImageExists()){
 948+ $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", 'multipart/related', $this->LE, $this->LE, $this->boundary[1], $this->LE);
 949+ } else {
 950+ $result .= $this->HeaderLine('Content-Type', 'multipart/mixed;');
 951+ $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
 952+ }
 953+ break;
 954+ case 'alt':
 955+ $result .= $this->HeaderLine('Content-Type', 'multipart/alternative;');
 956+ $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"');
 957+ break;
 958+ }
 959+
 960+ if($this->Mailer != 'mail') {
 961+ $result .= $this->LE.$this->LE;
 962+ }
 963+
 964+ return $result;
 965+ }
 966+
 967+ /**
 968+ * Assembles the message body. Returns an empty string on failure.
 969+ * @access public
 970+ * @return string
 971+ */
 972+ public function CreateBody() {
 973+ $result = '';
 974+
 975+ if ($this->sign_key_file) {
 976+ $result .= $this->GetMailMIME();
 977+ }
 978+
 979+ $this->SetWordWrap();
 980+
 981+ switch($this->message_type) {
 982+ case 'alt':
 983+ $result .= $this->GetBoundary($this->boundary[1], '', 'text/plain', '');
 984+ $result .= $this->EncodeString($this->AltBody, $this->Encoding);
 985+ $result .= $this->LE.$this->LE;
 986+ $result .= $this->GetBoundary($this->boundary[1], '', 'text/html', '');
 987+ $result .= $this->EncodeString($this->Body, $this->Encoding);
 988+ $result .= $this->LE.$this->LE;
 989+ $result .= $this->EndBoundary($this->boundary[1]);
 990+ break;
 991+ case 'plain':
 992+ $result .= $this->EncodeString($this->Body, $this->Encoding);
 993+ break;
 994+ case 'attachments':
 995+ $result .= $this->GetBoundary($this->boundary[1], '', '', '');
 996+ $result .= $this->EncodeString($this->Body, $this->Encoding);
 997+ $result .= $this->LE;
 998+ $result .= $this->AttachAll();
 999+ break;
 1000+ case 'alt_attachments':
 1001+ $result .= sprintf("--%s%s", $this->boundary[1], $this->LE);
 1002+ $result .= sprintf("Content-Type: %s;%s" . "\tboundary=\"%s\"%s", 'multipart/alternative', $this->LE, $this->boundary[2], $this->LE.$this->LE);
 1003+ $result .= $this->GetBoundary($this->boundary[2], '', 'text/plain', '') . $this->LE; // Create text body
 1004+ $result .= $this->EncodeString($this->AltBody, $this->Encoding);
 1005+ $result .= $this->LE.$this->LE;
 1006+ $result .= $this->GetBoundary($this->boundary[2], '', 'text/html', '') . $this->LE; // Create the HTML body
 1007+ $result .= $this->EncodeString($this->Body, $this->Encoding);
 1008+ $result .= $this->LE.$this->LE;
 1009+ $result .= $this->EndBoundary($this->boundary[2]);
 1010+ $result .= $this->AttachAll();
 1011+ break;
 1012+ }
 1013+
 1014+ if($this->IsError()) {
 1015+ $result = '';
 1016+ } else if ($this->sign_key_file) {
 1017+ $file = tempnam("", "mail");
 1018+ $fp = fopen($file, "w");
 1019+ fwrite($fp, $result);
 1020+ fclose($fp);
 1021+ $signed = tempnam("", "signed");
 1022+
 1023+ if (@openssl_pkcs7_sign($file, $signed, "file://".$this->sign_key_file, array("file://".$this->sign_key_file, $this->sign_key_pass), null)) {
 1024+ $fp = fopen($signed, "r");
 1025+ $result = fread($fp, filesize($this->sign_key_file));
 1026+ fclose($fp);
 1027+ } else {
 1028+ $this->SetError($this->Lang("signing").openssl_error_string());
 1029+ $result = '';
 1030+ }
 1031+
 1032+ unlink($file);
 1033+ unlink($signed);
 1034+ }
 1035+
 1036+ return $result;
 1037+ }
 1038+
 1039+ /**
 1040+ * Returns the start of a message boundary.
 1041+ * @access public
 1042+ */
 1043+ public function GetBoundary($boundary, $charSet, $contentType, $encoding) {
 1044+ $result = '';
 1045+ if($charSet == '') {
 1046+ $charSet = $this->CharSet;
 1047+ }
 1048+ if($contentType == '') {
 1049+ $contentType = $this->ContentType;
 1050+ }
 1051+ if($encoding == '') {
 1052+ $encoding = $this->Encoding;
 1053+ }
 1054+ $result .= $this->TextLine('--' . $boundary);
 1055+ $result .= sprintf("Content-Type: %s; charset = \"%s\"", $contentType, $charSet);
 1056+ $result .= $this->LE;
 1057+ $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding);
 1058+ $result .= $this->LE;
 1059+
 1060+ return $result;
 1061+ }
 1062+
 1063+ /**
 1064+ * Returns the end of a message boundary.
 1065+ * @access public
 1066+ */
 1067+ public function EndBoundary($boundary) {
 1068+ return $this->LE . '--' . $boundary . '--' . $this->LE;
 1069+ }
 1070+
 1071+ /**
 1072+ * Sets the message type.
 1073+ * @access public
 1074+ * @return void
 1075+ */
 1076+ public function SetMessageType() {
 1077+ if(count($this->attachment) < 1 && strlen($this->AltBody) < 1) {
 1078+ $this->message_type = 'plain';
 1079+ } else {
 1080+ if(count($this->attachment) > 0) {
 1081+ $this->message_type = 'attachments';
 1082+ }
 1083+ if(strlen($this->AltBody) > 0 && count($this->attachment) < 1) {
 1084+ $this->message_type = 'alt';
 1085+ }
 1086+ if(strlen($this->AltBody) > 0 && count($this->attachment) > 0) {
 1087+ $this->message_type = 'alt_attachments';
 1088+ }
 1089+ }
 1090+ }
 1091+
 1092+ /* Returns a formatted header line.
 1093+ * @access public
 1094+ * @return string
 1095+ */
 1096+ public function HeaderLine($name, $value) {
 1097+ return $name . ': ' . $value . $this->LE;
 1098+ }
 1099+
 1100+ /**
 1101+ * Returns a formatted mail line.
 1102+ * @access public
 1103+ * @return string
 1104+ */
 1105+ public function TextLine($value) {
 1106+ return $value . $this->LE;
 1107+ }
 1108+
 1109+ /////////////////////////////////////////////////
 1110+ // CLASS METHODS, ATTACHMENTS
 1111+ /////////////////////////////////////////////////
 1112+
 1113+ /**
 1114+ * Adds an attachment from a path on the filesystem.
 1115+ * Returns false if the file could not be found
 1116+ * or accessed.
 1117+ * @param string $path Path to the attachment.
 1118+ * @param string $name Overrides the attachment name.
 1119+ * @param string $encoding File encoding (see $Encoding).
 1120+ * @param string $type File extension (MIME) type.
 1121+ * @return bool
 1122+ */
 1123+ public function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
 1124+ if(!@is_file($path)) {
 1125+ $this->SetError($this->Lang('file_access') . $path);
 1126+ return false;
 1127+ }
 1128+
 1129+ $filename = basename($path);
 1130+ if($name == '') {
 1131+ $name = $filename;
 1132+ }
 1133+
 1134+ $cur = count($this->attachment);
 1135+ $this->attachment[$cur][0] = $path;
 1136+ $this->attachment[$cur][1] = $filename;
 1137+ $this->attachment[$cur][2] = $name;
 1138+ $this->attachment[$cur][3] = $encoding;
 1139+ $this->attachment[$cur][4] = $type;
 1140+ $this->attachment[$cur][5] = false; // isStringAttachment
 1141+ $this->attachment[$cur][6] = 'attachment';
 1142+ $this->attachment[$cur][7] = 0;
 1143+
 1144+ return true;
 1145+ }
 1146+
 1147+ /**
 1148+ * Attaches all fs, string, and binary attachments to the message.
 1149+ * Returns an empty string on failure.
 1150+ * @access public
 1151+ * @return string
 1152+ */
 1153+ public function AttachAll() {
 1154+ /* Return text of body */
 1155+ $mime = array();
 1156+
 1157+ /* Add all attachments */
 1158+ for($i = 0; $i < count($this->attachment); $i++) {
 1159+ /* Check for string attachment */
 1160+ $bString = $this->attachment[$i][5];
 1161+ if ($bString) {
 1162+ $string = $this->attachment[$i][0];
 1163+ } else {
 1164+ $path = $this->attachment[$i][0];
 1165+ }
 1166+
 1167+ $filename = $this->attachment[$i][1];
 1168+ $name = $this->attachment[$i][2];
 1169+ $encoding = $this->attachment[$i][3];
 1170+ $type = $this->attachment[$i][4];
 1171+ $disposition = $this->attachment[$i][6];
 1172+ $cid = $this->attachment[$i][7];
 1173+
 1174+ $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE);
 1175+ $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $name, $this->LE);
 1176+ $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE);
 1177+
 1178+ if($disposition == 'inline') {
 1179+ $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE);
 1180+ }
 1181+
 1182+ $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $name, $this->LE.$this->LE);
 1183+
 1184+ /* Encode as string attachment */
 1185+ if($bString) {
 1186+ $mime[] = $this->EncodeString($string, $encoding);
 1187+ if($this->IsError()) {
 1188+ return '';
 1189+ }
 1190+ $mime[] = $this->LE.$this->LE;
 1191+ } else {
 1192+ $mime[] = $this->EncodeFile($path, $encoding);
 1193+ if($this->IsError()) {
 1194+ return '';
 1195+ }
 1196+ $mime[] = $this->LE.$this->LE;
 1197+ }
 1198+ }
 1199+
 1200+ $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE);
 1201+
 1202+ return join('', $mime);
 1203+ }
 1204+
 1205+ /**
 1206+ * Encodes attachment in requested format. Returns an
 1207+ * empty string on failure.
 1208+ * @access public
 1209+ * @return string
 1210+ */
 1211+ public function EncodeFile ($path, $encoding = 'base64') {
 1212+ if(!@$fd = fopen($path, 'rb')) {
 1213+ $this->SetError($this->Lang('file_open') . $path);
 1214+ return '';
 1215+ }
 1216+ $magic_quotes = get_magic_quotes_runtime();
 1217+ set_magic_quotes_runtime(0);
 1218+ $file_buffer = file_get_contents($path);
 1219+ $file_buffer = $this->EncodeString($file_buffer, $encoding);
 1220+ fclose($fd);
 1221+ set_magic_quotes_runtime($magic_quotes);
 1222+
 1223+ return $file_buffer;
 1224+ }
 1225+
 1226+ /**
 1227+ * Encodes string to requested format. Returns an
 1228+ * empty string on failure.
 1229+ * @access public
 1230+ * @return string
 1231+ */
 1232+ public function EncodeString ($str, $encoding = 'base64') {
 1233+ $encoded = '';
 1234+ switch(strtolower($encoding)) {
 1235+ case 'base64':
 1236+ $encoded = chunk_split(base64_encode($str), 76, $this->LE);
 1237+ break;
 1238+ case '7bit':
 1239+ case '8bit':
 1240+ $encoded = $this->FixEOL($str);
 1241+ if (substr($encoded, -(strlen($this->LE))) != $this->LE)
 1242+ $encoded .= $this->LE;
 1243+ break;
 1244+ case 'binary':
 1245+ $encoded = $str;
 1246+ break;
 1247+ case 'quoted-printable':
 1248+ $encoded = $this->EncodeQP($str);
 1249+ break;
 1250+ default:
 1251+ $this->SetError($this->Lang('encoding') . $encoding);
 1252+ break;
 1253+ }
 1254+ return $encoded;
 1255+ }
 1256+
 1257+ /**
 1258+ * Encode a header string to best of Q, B, quoted or none.
 1259+ * @access public
 1260+ * @return string
 1261+ */
 1262+ public function EncodeHeader ($str, $position = 'text') {
 1263+ $x = 0;
 1264+
 1265+ switch (strtolower($position)) {
 1266+ case 'phrase':
 1267+ if (!preg_match('/[\200-\377]/', $str)) {
 1268+ /* Can't use addslashes as we don't know what value has magic_quotes_sybase. */
 1269+ $encoded = addcslashes($str, "\0..\37\177\\\"");
 1270+ if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) {
 1271+ return ($encoded);
 1272+ } else {
 1273+ return ("\"$encoded\"");
 1274+ }
 1275+ }
 1276+ $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches);
 1277+ break;
 1278+ case 'comment':
 1279+ $x = preg_match_all('/[()"]/', $str, $matches);
 1280+ /* Fall-through */
 1281+ case 'text':
 1282+ default:
 1283+ $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches);
 1284+ break;
 1285+ }
 1286+
 1287+ if ($x == 0) {
 1288+ return ($str);
 1289+ }
 1290+
 1291+ $maxlen = 75 - 7 - strlen($this->CharSet);
 1292+ /* Try to select the encoding which should produce the shortest output */
 1293+ if (strlen($str)/3 < $x) {
 1294+ $encoding = 'B';
 1295+ if (function_exists('mb_strlen') && $this->HasMultiBytes($str)) {
 1296+ // Use a custom function which correctly encodes and wraps long
 1297+ // multibyte strings without breaking lines within a character
 1298+ $encoded = $this->Base64EncodeWrapMB($str);
 1299+ } else {
 1300+ $encoded = base64_encode($str);
 1301+ $maxlen -= $maxlen % 4;
 1302+ $encoded = trim(chunk_split($encoded, $maxlen, "\n"));
 1303+ }
 1304+ } else {
 1305+ $encoding = 'Q';
 1306+ $encoded = $this->EncodeQ($str, $position);
 1307+ $encoded = $this->WrapText($encoded, $maxlen, true);
 1308+ $encoded = str_replace('='.$this->LE, "\n", trim($encoded));
 1309+ }
 1310+
 1311+ $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded);
 1312+ $encoded = trim(str_replace("\n", $this->LE, $encoded));
 1313+
 1314+ return $encoded;
 1315+ }
 1316+
 1317+ /**
 1318+ * Checks if a string contains multibyte characters.
 1319+ * @access public
 1320+ * @param string $str multi-byte text to wrap encode
 1321+ * @return bool
 1322+ */
 1323+ public function HasMultiBytes($str) {
 1324+ if (function_exists('mb_strlen')) {
 1325+ return (strlen($str) > mb_strlen($str, $this->CharSet));
 1326+ } else { // Assume no multibytes (we can't handle without mbstring functions anyway)
 1327+ return False;
 1328+ }
 1329+ }
 1330+
 1331+ /**
 1332+ * Correctly encodes and wraps long multibyte strings for mail headers
 1333+ * without breaking lines within a character.
 1334+ * Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php
 1335+ * @access public
 1336+ * @param string $str multi-byte text to wrap encode
 1337+ * @return string
 1338+ */
 1339+ public function Base64EncodeWrapMB($str) {
 1340+ $start = "=?".$this->CharSet."?B?";
 1341+ $end = "?=";
 1342+ $encoded = "";
 1343+
 1344+ $mb_length = mb_strlen($str, $this->CharSet);
 1345+ // Each line must have length <= 75, including $start and $end
 1346+ $length = 75 - strlen($start) - strlen($end);
 1347+ // Average multi-byte ratio
 1348+ $ratio = $mb_length / strlen($str);
 1349+ // Base64 has a 4:3 ratio
 1350+ $offset = $avgLength = floor($length * $ratio * .75);
 1351+
 1352+ for ($i = 0; $i < $mb_length; $i += $offset) {
 1353+ $lookBack = 0;
 1354+
 1355+ do {
 1356+ $offset = $avgLength - $lookBack;
 1357+ $chunk = mb_substr($str, $i, $offset, $this->CharSet);
 1358+ $chunk = base64_encode($chunk);
 1359+ $lookBack++;
 1360+ }
 1361+ while (strlen($chunk) > $length);
 1362+
 1363+ $encoded .= $chunk . $this->LE;
 1364+ }
 1365+
 1366+ // Chomp the last linefeed
 1367+ $encoded = substr($encoded, 0, -strlen($this->LE));
 1368+ return $encoded;
 1369+ }
 1370+
 1371+ /**
 1372+ * Encode string to quoted-printable.
 1373+ * @access public
 1374+ * @param string $string the text to encode
 1375+ * @param integer $line_max Number of chars allowed on a line before wrapping
 1376+ * @return string
 1377+ */
 1378+ public function EncodeQP( $input = '', $line_max = 76, $space_conv = false ) {
 1379+ $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
 1380+ $lines = preg_split('/(?:\r\n|\r|\n)/', $input);
 1381+ $eol = "\r\n";
 1382+ $escape = '=';
 1383+ $output = '';
 1384+ while( list(, $line) = each($lines) ) {
 1385+ $linlen = strlen($line);
 1386+ $newline = '';
 1387+ for($i = 0; $i < $linlen; $i++) {
 1388+ $c = substr( $line, $i, 1 );
 1389+ $dec = ord( $c );
 1390+ if ( ( $i == 0 ) && ( $dec == 46 ) ) { // convert first point in the line into =2E
 1391+ $c = '=2E';
 1392+ }
 1393+ if ( $dec == 32 ) {
 1394+ if ( $i == ( $linlen - 1 ) ) { // convert space at eol only
 1395+ $c = '=20';
 1396+ } else if ( $space_conv ) {
 1397+ $c = '=20';
 1398+ }
 1399+ } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required
 1400+ $h2 = floor($dec/16);
 1401+ $h1 = floor($dec%16);
 1402+ $c = $escape.$hex[$h2].$hex[$h1];
 1403+ }
 1404+ if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted
 1405+ $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay
 1406+ $newline = '';
 1407+ // check if newline first character will be point or not
 1408+ if ( $dec == 46 ) {
 1409+ $c = '=2E';
 1410+ }
 1411+ }
 1412+ $newline .= $c;
 1413+ } // end of for
 1414+ $output .= $newline.$eol;
 1415+ } // end of while
 1416+ return trim($output);
 1417+ }
 1418+
 1419+ /**
 1420+ * Encode string to q encoding.
 1421+ * @access public
 1422+ * @return string
 1423+ */
 1424+ public function EncodeQ ($str, $position = 'text') {
 1425+ /* There should not be any EOL in the string */
 1426+ $encoded = preg_replace("[\r\n]", '', $str);
 1427+
 1428+ switch (strtolower($position)) {
 1429+ case 'phrase':
 1430+ $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
 1431+ break;
 1432+ case 'comment':
 1433+ $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded);
 1434+ case 'text':
 1435+ default:
 1436+ /* Replace every high ascii, control =, ? and _ characters */
 1437+ $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e',
 1438+ "'='.sprintf('%02X', ord('\\1'))", $encoded);
 1439+ break;
 1440+ }
 1441+
 1442+ /* Replace every spaces to _ (more readable than =20) */
 1443+ $encoded = str_replace(' ', '_', $encoded);
 1444+
 1445+ return $encoded;
 1446+ }
 1447+
 1448+ /**
 1449+ * Adds a string or binary attachment (non-filesystem) to the list.
 1450+ * This method can be used to attach ascii or binary data,
 1451+ * such as a BLOB record from a database.
 1452+ * @param string $string String attachment data.
 1453+ * @param string $filename Name of the attachment.
 1454+ * @param string $encoding File encoding (see $Encoding).
 1455+ * @param string $type File extension (MIME) type.
 1456+ * @return void
 1457+ */
 1458+ public function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream') {
 1459+ /* Append to $attachment array */
 1460+ $cur = count($this->attachment);
 1461+ $this->attachment[$cur][0] = $string;
 1462+ $this->attachment[$cur][1] = $filename;
 1463+ $this->attachment[$cur][2] = $filename;
 1464+ $this->attachment[$cur][3] = $encoding;
 1465+ $this->attachment[$cur][4] = $type;
 1466+ $this->attachment[$cur][5] = true; // isString
 1467+ $this->attachment[$cur][6] = 'attachment';
 1468+ $this->attachment[$cur][7] = 0;
 1469+ }
 1470+
 1471+ /**
 1472+ * Adds an embedded attachment. This can include images, sounds, and
 1473+ * just about any other document. Make sure to set the $type to an
 1474+ * image type. For JPEG images use "image/jpeg" and for GIF images
 1475+ * use "image/gif".
 1476+ * @param string $path Path to the attachment.
 1477+ * @param string $cid Content ID of the attachment. Use this to identify
 1478+ * the Id for accessing the image in an HTML form.
 1479+ * @param string $name Overrides the attachment name.
 1480+ * @param string $encoding File encoding (see $Encoding).
 1481+ * @param string $type File extension (MIME) type.
 1482+ * @return bool
 1483+ */
 1484+ public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
 1485+
 1486+ if(!@is_file($path)) {
 1487+ $this->SetError($this->Lang('file_access') . $path);
 1488+ return false;
 1489+ }
 1490+
 1491+ $filename = basename($path);
 1492+ if($name == '') {
 1493+ $name = $filename;
 1494+ }
 1495+
 1496+ /* Append to $attachment array */
 1497+ $cur = count($this->attachment);
 1498+ $this->attachment[$cur][0] = $path;
 1499+ $this->attachment[$cur][1] = $filename;
 1500+ $this->attachment[$cur][2] = $name;
 1501+ $this->attachment[$cur][3] = $encoding;
 1502+ $this->attachment[$cur][4] = $type;
 1503+ $this->attachment[$cur][5] = false;
 1504+ $this->attachment[$cur][6] = 'inline';
 1505+ $this->attachment[$cur][7] = $cid;
 1506+
 1507+ return true;
 1508+ }
 1509+
 1510+ /**
 1511+ * Returns true if an inline attachment is present.
 1512+ * @access public
 1513+ * @return bool
 1514+ */
 1515+ public function InlineImageExists() {
 1516+ $result = false;
 1517+ for($i = 0; $i < count($this->attachment); $i++) {
 1518+ if($this->attachment[$i][6] == 'inline') {
 1519+ $result = true;
 1520+ break;
 1521+ }
 1522+ }
 1523+
 1524+ return $result;
 1525+ }
 1526+
 1527+ /////////////////////////////////////////////////
 1528+ // CLASS METHODS, MESSAGE RESET
 1529+ /////////////////////////////////////////////////
 1530+
 1531+ /**
 1532+ * Clears all recipients assigned in the TO array. Returns void.
 1533+ * @return void
 1534+ */
 1535+ public function ClearAddresses() {
 1536+ $this->to = array();
 1537+ }
 1538+
 1539+ /**
 1540+ * Clears all recipients assigned in the CC array. Returns void.
 1541+ * @return void
 1542+ */
 1543+ public function ClearCCs() {
 1544+ $this->cc = array();
 1545+ }
 1546+
 1547+ /**
 1548+ * Clears all recipients assigned in the BCC array. Returns void.
 1549+ * @return void
 1550+ */
 1551+ public function ClearBCCs() {
 1552+ $this->bcc = array();
 1553+ }
 1554+
 1555+ /**
 1556+ * Clears all recipients assigned in the ReplyTo array. Returns void.
 1557+ * @return void
 1558+ */
 1559+ public function ClearReplyTos() {
 1560+ $this->ReplyTo = array();
 1561+ }
 1562+
 1563+ /**
 1564+ * Clears all recipients assigned in the TO, CC and BCC
 1565+ * array. Returns void.
 1566+ * @return void
 1567+ */
 1568+ public function ClearAllRecipients() {
 1569+ $this->to = array();
 1570+ $this->cc = array();
 1571+ $this->bcc = array();
 1572+ }
 1573+
 1574+ /**
 1575+ * Clears all previously set filesystem, string, and binary
 1576+ * attachments. Returns void.
 1577+ * @return void
 1578+ */
 1579+ public function ClearAttachments() {
 1580+ $this->attachment = array();
 1581+ }
 1582+
 1583+ /**
 1584+ * Clears all custom headers. Returns void.
 1585+ * @return void
 1586+ */
 1587+ public function ClearCustomHeaders() {
 1588+ $this->CustomHeader = array();
 1589+ }
 1590+
 1591+ /////////////////////////////////////////////////
 1592+ // CLASS METHODS, MISCELLANEOUS
 1593+ /////////////////////////////////////////////////
 1594+
 1595+ /**
 1596+ * Adds the error message to the error container.
 1597+ * Returns void.
 1598+ * @access private
 1599+ * @return void
 1600+ */
 1601+ private function SetError($msg) {
 1602+ $this->error_count++;
 1603+ $this->ErrorInfo = $msg;
 1604+ }
 1605+
 1606+ /**
 1607+ * Returns the proper RFC 822 formatted date.
 1608+ * @access private
 1609+ * @return string
 1610+ */
 1611+ private static function RFCDate() {
 1612+ $tz = date('Z');
 1613+ $tzs = ($tz < 0) ? '-' : '+';
 1614+ $tz = abs($tz);
 1615+ $tz = (int)($tz/3600)*100 + ($tz%3600)/60;
 1616+ $result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz);
 1617+
 1618+ return $result;
 1619+ }
 1620+
 1621+ /**
 1622+ * Returns the server hostname or 'localhost.localdomain' if unknown.
 1623+ * @access private
 1624+ * @return string
 1625+ */
 1626+ private function ServerHostname() {
 1627+ if (!empty($this->Hostname)) {
 1628+ $result = $this->Hostname;
 1629+ } elseif (isset($_SERVER['SERVER_NAME'])) {
 1630+ $result = $_SERVER['SERVER_NAME'];
 1631+ } else {
 1632+ $result = "localhost.localdomain";
 1633+ }
 1634+
 1635+ return $result;
 1636+ }
 1637+
 1638+ /**
 1639+ * Returns a message in the appropriate language.
 1640+ * @access private
 1641+ * @return string
 1642+ */
 1643+ private function Lang($key) {
 1644+ if(count($this->language) < 1) {
 1645+ $this->SetLanguage('en'); // set the default language
 1646+ }
 1647+
 1648+ if(isset($this->language[$key])) {
 1649+ return $this->language[$key];
 1650+ } else {
 1651+ return 'Language string failed to load: ' . $key;
 1652+ }
 1653+ }
 1654+
 1655+ /**
 1656+ * Returns true if an error occurred.
 1657+ * @access public
 1658+ * @return bool
 1659+ */
 1660+ public function IsError() {
 1661+ return ($this->error_count > 0);
 1662+ }
 1663+
 1664+ /**
 1665+ * Changes every end of line from CR or LF to CRLF.
 1666+ * @access private
 1667+ * @return string
 1668+ */
 1669+ private function FixEOL($str) {
 1670+ $str = str_replace("\r\n", "\n", $str);
 1671+ $str = str_replace("\r", "\n", $str);
 1672+ $str = str_replace("\n", $this->LE, $str);
 1673+ return $str;
 1674+ }
 1675+
 1676+ /**
 1677+ * Adds a custom header.
 1678+ * @access public
 1679+ * @return void
 1680+ */
 1681+ public function AddCustomHeader($custom_header) {
 1682+ $this->CustomHeader[] = explode(':', $custom_header, 2);
 1683+ }
 1684+
 1685+ /**
 1686+ * Evaluates the message and returns modifications for inline images and backgrounds
 1687+ * @access public
 1688+ * @return $message
 1689+ */
 1690+ public function MsgHTML($message,$basedir='') {
 1691+ preg_match_all("/(src|background)=\"(.*)\"/Ui", $message, $images);
 1692+ if(isset($images[2])) {
 1693+ foreach($images[2] as $i => $url) {
 1694+ // do not change urls for absolute images (thanks to corvuscorax)
 1695+ if (!preg_match('/^[A-z][A-z]*:\/\//',$url)) {
 1696+ $filename = basename($url);
 1697+ $directory = dirname($url);
 1698+ ($directory == '.')?$directory='':'';
 1699+ $cid = 'cid:' . md5($filename);
 1700+ $fileParts = split("\.", $filename);
 1701+ $ext = $fileParts[1];
 1702+ $mimeType = $this->_mime_types($ext);
 1703+ if ( strlen($basedir) > 1 && substr($basedir,-1) != '/') { $basedir .= '/'; }
 1704+ if ( strlen($directory) > 1 && substr($basedir,-1) != '/') { $directory .= '/'; }
 1705+ $this->AddEmbeddedImage($basedir.$directory.$filename, md5($filename), $filename, 'base64', $mimeType);
 1706+ if ( $this->AddEmbeddedImage($basedir.$directory.$filename, md5($filename), $filename, 'base64',$mimeType) ) {
 1707+ $message = preg_replace("/".$images[1][$i]."=\"".preg_quote($url, '/')."\"/Ui", $images[1][$i]."=\"".$cid."\"", $message);
 1708+ }
 1709+ }
 1710+ }
 1711+ }
 1712+ $this->IsHTML(true);
 1713+ $this->Body = $message;
 1714+ $textMsg = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s','',$message)));
 1715+ if ( !empty($textMsg) && empty($this->AltBody) ) {
 1716+ $this->AltBody = $textMsg;
 1717+ }
 1718+ if ( empty($this->AltBody) ) {
 1719+ $this->AltBody = 'To view this email message, open the email in with HTML compatibility!' . "\n\n";
 1720+ }
 1721+ }
 1722+
 1723+ /**
 1724+ * Gets the mime type of the embedded or inline image
 1725+ * @access public
 1726+ * @return mime type of ext
 1727+ */
 1728+ public function _mime_types($ext = '') {
 1729+ $mimes = array(
 1730+ 'hqx' => 'application/mac-binhex40',
 1731+ 'cpt' => 'application/mac-compactpro',
 1732+ 'doc' => 'application/msword',
 1733+ 'bin' => 'application/macbinary',
 1734+ 'dms' => 'application/octet-stream',
 1735+ 'lha' => 'application/octet-stream',
 1736+ 'lzh' => 'application/octet-stream',
 1737+ 'exe' => 'application/octet-stream',
 1738+ 'class' => 'application/octet-stream',
 1739+ 'psd' => 'application/octet-stream',
 1740+ 'so' => 'application/octet-stream',
 1741+ 'sea' => 'application/octet-stream',
 1742+ 'dll' => 'application/octet-stream',
 1743+ 'oda' => 'application/oda',
 1744+ 'pdf' => 'application/pdf',
 1745+ 'ai' => 'application/postscript',
 1746+ 'eps' => 'application/postscript',
 1747+ 'ps' => 'application/postscript',
 1748+ 'smi' => 'application/smil',
 1749+ 'smil' => 'application/smil',
 1750+ 'mif' => 'application/vnd.mif',
 1751+ 'xls' => 'application/vnd.ms-excel',
 1752+ 'ppt' => 'application/vnd.ms-powerpoint',
 1753+ 'wbxml' => 'application/vnd.wap.wbxml',
 1754+ 'wmlc' => 'application/vnd.wap.wmlc',
 1755+ 'dcr' => 'application/x-director',
 1756+ 'dir' => 'application/x-director',
 1757+ 'dxr' => 'application/x-director',
 1758+ 'dvi' => 'application/x-dvi',
 1759+ 'gtar' => 'application/x-gtar',
 1760+ 'php' => 'application/x-httpd-php',
 1761+ 'php4' => 'application/x-httpd-php',
 1762+ 'php3' => 'application/x-httpd-php',
 1763+ 'phtml' => 'application/x-httpd-php',
 1764+ 'phps' => 'application/x-httpd-php-source',
 1765+ 'js' => 'application/x-javascript',
 1766+ 'swf' => 'application/x-shockwave-flash',
 1767+ 'sit' => 'application/x-stuffit',
 1768+ 'tar' => 'application/x-tar',
 1769+ 'tgz' => 'application/x-tar',
 1770+ 'xhtml' => 'application/xhtml+xml',
 1771+ 'xht' => 'application/xhtml+xml',
 1772+ 'zip' => 'application/zip',
 1773+ 'mid' => 'audio/midi',
 1774+ 'midi' => 'audio/midi',
 1775+ 'mpga' => 'audio/mpeg',
 1776+ 'mp2' => 'audio/mpeg',
 1777+ 'mp3' => 'audio/mpeg',
 1778+ 'aif' => 'audio/x-aiff',
 1779+ 'aiff' => 'audio/x-aiff',
 1780+ 'aifc' => 'audio/x-aiff',
 1781+ 'ram' => 'audio/x-pn-realaudio',
 1782+ 'rm' => 'audio/x-pn-realaudio',
 1783+ 'rpm' => 'audio/x-pn-realaudio-plugin',
 1784+ 'ra' => 'audio/x-realaudio',
 1785+ 'rv' => 'video/vnd.rn-realvideo',
 1786+ 'wav' => 'audio/x-wav',
 1787+ 'bmp' => 'image/bmp',
 1788+ 'gif' => 'image/gif',
 1789+ 'jpeg' => 'image/jpeg',
 1790+ 'jpg' => 'image/jpeg',
 1791+ 'jpe' => 'image/jpeg',
 1792+ 'png' => 'image/png',
 1793+ 'tiff' => 'image/tiff',
 1794+ 'tif' => 'image/tiff',
 1795+ 'css' => 'text/css',
 1796+ 'html' => 'text/html',
 1797+ 'htm' => 'text/html',
 1798+ 'shtml' => 'text/html',
 1799+ 'txt' => 'text/plain',
 1800+ 'text' => 'text/plain',
 1801+ 'log' => 'text/plain',
 1802+ 'rtx' => 'text/richtext',
 1803+ 'rtf' => 'text/rtf',
 1804+ 'xml' => 'text/xml',
 1805+ 'xsl' => 'text/xml',
 1806+ 'mpeg' => 'video/mpeg',
 1807+ 'mpg' => 'video/mpeg',
 1808+ 'mpe' => 'video/mpeg',
 1809+ 'qt' => 'video/quicktime',
 1810+ 'mov' => 'video/quicktime',
 1811+ 'avi' => 'video/x-msvideo',
 1812+ 'movie' => 'video/x-sgi-movie',
 1813+ 'doc' => 'application/msword',
 1814+ 'word' => 'application/msword',
 1815+ 'xl' => 'application/excel',
 1816+ 'eml' => 'message/rfc822'
 1817+ );
 1818+ return ( ! isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)];
 1819+ }
 1820+
 1821+ /**
 1822+ * Set (or reset) Class Objects (variables)
 1823+ *
 1824+ * Usage Example:
 1825+ * $page->set('X-Priority', '3');
 1826+ *
 1827+ * @access public
 1828+ * @param string $name Parameter Name
 1829+ * @param mixed $value Parameter Value
 1830+ * NOTE: will not work with arrays, there are no arrays to set/reset
 1831+ */
 1832+ public function set ( $name, $value = '' ) {
 1833+ if ( isset($this->$name) ) {
 1834+ $this->$name = $value;
 1835+ } else {
 1836+ $this->SetError('Cannot set or reset variable ' . $name);
 1837+ return false;
 1838+ }
 1839+ }
 1840+
 1841+ /**
 1842+ * Read a file from a supplied filename and return it.
 1843+ *
 1844+ * @access public
 1845+ * @param string $filename Parameter File Name
 1846+ */
 1847+ public function getFile($filename) {
 1848+ $return = '';
 1849+ if ($fp = fopen($filename, 'rb')) {
 1850+ while (!feof($fp)) {
 1851+ $return .= fread($fp, 1024);
 1852+ }
 1853+ fclose($fp);
 1854+ return $return;
 1855+ } else {
 1856+ return false;
 1857+ }
 1858+ }
 1859+
 1860+ /**
 1861+ * Strips newlines to prevent header injection.
 1862+ * @access public
 1863+ * @param string $str String
 1864+ * @return string
 1865+ */
 1866+ public function SecureHeader($str) {
 1867+ $str = trim($str);
 1868+ $str = str_replace("\r", "", $str);
 1869+ $str = str_replace("\n", "", $str);
 1870+ return $str;
 1871+ }
 1872+
 1873+ /**
 1874+ * Set the private key file and password to sign the message.
 1875+ *
 1876+ * @access public
 1877+ * @param string $key_filename Parameter File Name
 1878+ * @param string $key_pass Password for private key
 1879+ */
 1880+ public function Sign($key_filename, $key_pass) {
 1881+ $this->sign_key_file = $key_filename;
 1882+ $this->sign_key_pass = $key_pass;
 1883+ }
 1884+
 1885+}
 1886+
 1887+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/class.phpmailer.php
___________________________________________________________________
Added: svn:eol-style
11888 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/class.pop3.php
@@ -0,0 +1,393 @@
 2+<?php
 3+/*~ class.pop3.php
 4+.---------------------------------------------------------------------------.
 5+| Software: PHPMailer - PHP email class |
 6+| Version: 2.1 |
 7+| Contact: via sourceforge.net support pages (also www.codeworxtech.com) |
 8+| Info: http://phpmailer.sourceforge.net |
 9+| Support: http://sourceforge.net/projects/phpmailer/ |
 10+| ------------------------------------------------------------------------- |
 11+| Author: Andy Prevost (project admininistrator) |
 12+| Author: Brent R. Matzelle (original founder) |
 13+| Copyright (c) 2004-2007, Andy Prevost. All Rights Reserved. |
 14+| Copyright (c) 2001-2003, Brent R. Matzelle |
 15+| ------------------------------------------------------------------------- |
 16+| License: Distributed under the Lesser General Public License (LGPL) |
 17+| http://www.gnu.org/copyleft/lesser.html |
 18+| This program is distributed in the hope that it will be useful - WITHOUT |
 19+| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
 20+| FITNESS FOR A PARTICULAR PURPOSE. |
 21+| ------------------------------------------------------------------------- |
 22+| We offer a number of paid services (www.codeworxtech.com): |
 23+| - Web Hosting on highly optimized fast and secure servers |
 24+| - Technology Consulting |
 25+| - Oursourcing (highly qualified programmers and graphic designers) |
 26+'---------------------------------------------------------------------------'
 27+
 28+/**
 29+ * POP Before SMTP Authentication Class
 30+ * Version 2.1
 31+ *
 32+ * Author: Richard Davey (rich@corephp.co.uk)
 33+ * Modifications: Andy Prevost
 34+ * License: LGPL, see PHPMailer License
 35+ *
 36+ * Specifically for PHPMailer to allow POP before SMTP authentication.
 37+ * Does not yet work with APOP - if you have an APOP account, contact me
 38+ * and we can test changes to this script.
 39+ *
 40+ * This class is based on the structure of the SMTP class by Chris Ryan
 41+ *
 42+ * This class is rfc 1939 compliant and implements all the commands
 43+ * required for POP3 connection, authentication and disconnection.
 44+ *
 45+ * @package PHPMailer
 46+ * @author Richard Davey
 47+ */
 48+
 49+class POP3 {
 50+ /**
 51+ * Default POP3 port
 52+ * @var int
 53+ */
 54+ public $POP3_PORT = 110;
 55+
 56+ /**
 57+ * Default Timeout
 58+ * @var int
 59+ */
 60+ public $POP3_TIMEOUT = 30;
 61+
 62+ /**
 63+ * POP3 Carriage Return + Line Feed
 64+ * @var string
 65+ */
 66+ public $CRLF = "\r\n";
 67+
 68+ /**
 69+ * Displaying Debug warnings? (0 = now, 1+ = yes)
 70+ * @var int
 71+ */
 72+ public $do_debug = 2;
 73+
 74+ /**
 75+ * POP3 Mail Server
 76+ * @var string
 77+ */
 78+ public $host;
 79+
 80+ /**
 81+ * POP3 Port
 82+ * @var int
 83+ */
 84+ public $port;
 85+
 86+ /**
 87+ * POP3 Timeout Value
 88+ * @var int
 89+ */
 90+ public $tval;
 91+
 92+ /**
 93+ * POP3 Username
 94+ * @var string
 95+ */
 96+ public $username;
 97+
 98+ /**
 99+ * POP3 Password
 100+ * @var string
 101+ */
 102+ public $password;
 103+
 104+ /**#@+
 105+ * @access private
 106+ */
 107+ private $pop_conn;
 108+ private $connected;
 109+ private $error; // Error log array
 110+ /**#@-*/
 111+
 112+ /**
 113+ * Constructor, sets the initial values
 114+ * @access public
 115+ * @return POP3
 116+ */
 117+ public function __construct() {
 118+ $this->pop_conn = 0;
 119+ $this->connected = false;
 120+ $this->error = null;
 121+ }
 122+
 123+ /**
 124+ * Combination of public events - connect, login, disconnect
 125+ * @access public
 126+ * @param string $host
 127+ * @param integer $port
 128+ * @param integer $tval
 129+ * @param string $username
 130+ * @param string $password
 131+ */
 132+ public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) {
 133+ $this->host = $host;
 134+
 135+ // If no port value is passed, retrieve it
 136+ if ($port == false) {
 137+ $this->port = $this->POP3_PORT;
 138+ } else {
 139+ $this->port = $port;
 140+ }
 141+
 142+ // If no port value is passed, retrieve it
 143+ if ($tval == false) {
 144+ $this->tval = $this->POP3_TIMEOUT;
 145+ } else {
 146+ $this->tval = $tval;
 147+ }
 148+
 149+ $this->do_debug = $debug_level;
 150+ $this->username = $username;
 151+ $this->password = $password;
 152+
 153+ // Refresh the error log
 154+ $this->error = null;
 155+
 156+ // Connect
 157+ $result = $this->Connect($this->host, $this->port, $this->tval);
 158+
 159+ if ($result) {
 160+ $login_result = $this->Login($this->username, $this->password);
 161+
 162+ if ($login_result) {
 163+ $this->Disconnect();
 164+
 165+ return true;
 166+ }
 167+
 168+ }
 169+
 170+ // We need to disconnect regardless if the login succeeded
 171+ $this->Disconnect();
 172+
 173+ return false;
 174+ }
 175+
 176+ /**
 177+ * Connect to the POP3 server
 178+ * @access public
 179+ * @param string $host
 180+ * @param integer $port
 181+ * @param integer $tval
 182+ * @return boolean
 183+ */
 184+ public function Connect ($host, $port = false, $tval = 30) {
 185+ // Are we already connected?
 186+ if ($this->connected) {
 187+ return true;
 188+ }
 189+
 190+ /*
 191+ On Windows this will raise a PHP Warning error if the hostname doesn't exist.
 192+ Rather than supress it with @fsockopen, let's capture it cleanly instead
 193+ */
 194+
 195+ set_error_handler(array(&$this, 'catchWarning'));
 196+
 197+ // Connect to the POP3 server
 198+ $this->pop_conn = fsockopen($host, // POP3 Host
 199+ $port, // Port #
 200+ $errno, // Error Number
 201+ $errstr, // Error Message
 202+ $tval); // Timeout (seconds)
 203+
 204+ // Restore the error handler
 205+ restore_error_handler();
 206+
 207+ // Does the Error Log now contain anything?
 208+ if ($this->error && $this->do_debug >= 1) {
 209+ $this->displayErrors();
 210+ }
 211+
 212+ // Did we connect?
 213+ if ($this->pop_conn == false) {
 214+ // It would appear not...
 215+ $this->error = array(
 216+ 'error' => "Failed to connect to server $host on port $port",
 217+ 'errno' => $errno,
 218+ 'errstr' => $errstr
 219+ );
 220+
 221+ if ($this->do_debug >= 1) {
 222+ $this->displayErrors();
 223+ }
 224+
 225+ return false;
 226+ }
 227+
 228+ // Increase the stream time-out
 229+
 230+ // Check for PHP 4.3.0 or later
 231+ if (version_compare(phpversion(), '4.3.0', 'ge')) {
 232+ stream_set_timeout($this->pop_conn, $tval, 0);
 233+ } else {
 234+ // Does not work on Windows
 235+ if (substr(PHP_OS, 0, 3) !== 'WIN') {
 236+ socket_set_timeout($this->pop_conn, $tval, 0);
 237+ }
 238+ }
 239+
 240+ // Get the POP3 server response
 241+ $pop3_response = $this->getResponse();
 242+
 243+ // Check for the +OK
 244+ if ($this->checkResponse($pop3_response)) {
 245+ // The connection is established and the POP3 server is talking
 246+ $this->connected = true;
 247+ return true;
 248+ }
 249+
 250+ }
 251+
 252+ /**
 253+ * Login to the POP3 server (does not support APOP yet)
 254+ * @access public
 255+ * @param string $username
 256+ * @param string $password
 257+ * @return boolean
 258+ */
 259+ public function Login ($username = '', $password = '') {
 260+ if ($this->connected == false) {
 261+ $this->error = 'Not connected to POP3 server';
 262+
 263+ if ($this->do_debug >= 1) {
 264+ $this->displayErrors();
 265+ }
 266+ }
 267+
 268+ if (empty($username)) {
 269+ $username = $this->username;
 270+ }
 271+
 272+ if (empty($password)) {
 273+ $password = $this->password;
 274+ }
 275+
 276+ $pop_username = "USER $username" . $this->CRLF;
 277+ $pop_password = "PASS $password" . $this->CRLF;
 278+
 279+ // Send the Username
 280+ $this->sendString($pop_username);
 281+ $pop3_response = $this->getResponse();
 282+
 283+ if ($this->checkResponse($pop3_response)) {
 284+ // Send the Password
 285+ $this->sendString($pop_password);
 286+ $pop3_response = $this->getResponse();
 287+
 288+ if ($this->checkResponse($pop3_response)) {
 289+ return true;
 290+ } else {
 291+ return false;
 292+ }
 293+ } else {
 294+ return false;
 295+ }
 296+ }
 297+
 298+ /**
 299+ * Disconnect from the POP3 server
 300+ * @access public
 301+ */
 302+ public function Disconnect () {
 303+ $this->sendString('QUIT');
 304+
 305+ fclose($this->pop_conn);
 306+ }
 307+
 308+ /////////////////////////////////////////////////
 309+ // Private Methods
 310+ /////////////////////////////////////////////////
 311+
 312+ /**
 313+ * Get the socket response back.
 314+ * $size is the maximum number of bytes to retrieve
 315+ * @access private
 316+ * @param integer $size
 317+ * @return string
 318+ */
 319+ private public function getResponse ($size = 128) {
 320+ $pop3_response = fgets($this->pop_conn, $size);
 321+
 322+ return $pop3_response;
 323+ }
 324+
 325+ /**
 326+ * Send a string down the open socket connection to the POP3 server
 327+ * @access private
 328+ * @param string $string
 329+ * @return integer
 330+ */
 331+ private function sendString ($string) {
 332+ $bytes_sent = fwrite($this->pop_conn, $string, strlen($string));
 333+
 334+ return $bytes_sent;
 335+ }
 336+
 337+ /**
 338+ * Checks the POP3 server response for +OK or -ERR
 339+ * @access private
 340+ * @param string $string
 341+ * @return boolean
 342+ */
 343+ private function checkResponse ($string) {
 344+ if (substr($string, 0, 3) !== '+OK') {
 345+ $this->error = array(
 346+ 'error' => "Server reported an error: $string",
 347+ 'errno' => 0,
 348+ 'errstr' => ''
 349+ );
 350+
 351+ if ($this->do_debug >= 1) {
 352+ $this->displayErrors();
 353+ }
 354+
 355+ return false;
 356+ } else {
 357+ return true;
 358+ }
 359+
 360+ }
 361+
 362+ /**
 363+ * If debug is enabled, display the error message array
 364+ * @access private
 365+ */
 366+ private function displayErrors () {
 367+ echo '<pre>';
 368+
 369+ foreach ($this->error as $single_error) {
 370+ print_r($single_error);
 371+ }
 372+
 373+ echo '</pre>';
 374+ }
 375+
 376+ /**
 377+ * Takes over from PHP for the socket warning handler
 378+ * @access private
 379+ * @param integer $errno
 380+ * @param string $errstr
 381+ * @param string $errfile
 382+ * @param integer $errline
 383+ */
 384+ private function catchWarning ($errno, $errstr, $errfile, $errline) {
 385+ $this->error[] = array(
 386+ 'error' => "Connecting to the POP3 server raised a PHP warning: ",
 387+ 'errno' => $errno,
 388+ 'errstr' => $errstr
 389+ );
 390+ }
 391+
 392+ // End of class
 393+}
 394+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/class.pop3.php
___________________________________________________________________
Added: svn:eol-style
1395 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/README
@@ -0,0 +1,178 @@
 2+/*******************************************************************
 3+* The http://phpmailer.codeworxtech.com/ website now carries a few *
 4+* advertisements through the Google Adsense network. Please visit *
 5+* the advertiser sites and help us offset some of our costs. *
 6+* Thanks .... *
 7+********************************************************************/
 8+
 9+PHPMailer
 10+Full Featured Email Transfer Class for PHP
 11+==========================================
 12+
 13+Version 2.1 (June 04 2008)
 14+
 15+With this release, we are announcing that the development of PHPMailer for PHP5
 16+will be our focus from this date on. We have implemented all the enhancements
 17+and fixes from the latest release of PHPMailer for PHP4.
 18+
 19+Far more important, though, is that this release of PHPMailer (v2.1) is
 20+fully tested with E_STRICT error checking enabled.
 21+
 22+** NOTE: WE HAVE A NEW LANGUAGE VARIABLE FOR DIGITALLY SIGNED S/MIME EMAILS.
 23+ IF YOU CAN HELP WITH LANGUAGES OTHER THAN ENGLISH AND SPANISH, IT WOULD BE
 24+ APPRECIATED.
 25+
 26+We have now added S/MIME functionality (ability to digitally sign emails).
 27+BIG THANKS TO "sergiocambra" for posting this patch back in November 2007.
 28+The "Signed Emails" functionality adds the Sign method to pass the private key
 29+filename and the password to read it, and then email will be sent with
 30+content-type multipart/signed and with the digital signature attached.
 31+
 32+A quick note on E_STRICT:
 33+
 34+- In about half the test environments the development version was subjected
 35+ to, an error was thrown for the date() functions (used at line 1565 and 1569).
 36+ This is NOT a PHPMailer error, it is the result of an incorrectly configured
 37+ PHP5 installation. The fix is to modify your 'php.ini' file and include the
 38+ date.timezone = America/New York
 39+ directive, (for your own server timezone)
 40+- If you do get this error, and are unable to access your php.ini file, there is
 41+ a workaround. In your PHP script, add
 42+ date_default_timezone_set('America/Toronto');
 43+
 44+ * do NOT try to use
 45+ $myVar = date_default_timezone_get();
 46+ as a test, it will throw an error.
 47+
 48+We have also included more example files to show the use of "sendmail", "mail()",
 49+"smtp", and "gmail".
 50+
 51+We are also looking for more programmers to join the volunteer development team.
 52+If you have an interest in this, please let us know.
 53+
 54+Enjoy!
 55+
 56+
 57+Version 2.1.0beta1 & beta2
 58+
 59+please note, this is BETA software
 60+** DO NOT USE THIS IN PRODUCTION OR LIVE PROJECTS
 61+INTENDED STRICTLY FOR TESTING
 62+
 63+** NOTE:
 64+
 65+As of November 2007, PHPMailer has a new project team headed by industry
 66+veteran Andy Prevost (codeworxtech). The first release in more than two
 67+years will focus on fixes, adding ease-of-use enhancements, provide
 68+basic compatibility with PHP4 and PHP5 using PHP5 backwards compatibility
 69+features. A new release is planned before year-end 2007 that will provide
 70+full compatiblity with PHP4 and PHP5, as well as more bug fixes.
 71+
 72+We are looking for project developers to assist in restoring PHPMailer to
 73+its leadership position. Our goals are to simplify use of PHPMailer, provide
 74+good documentation and examples, and retain backward compatibility to level
 75+1.7.3 standards.
 76+
 77+If you are interested in helping out, visit http://sourceforge.net/phpmailer
 78+and indicate your interest.
 79+
 80+**
 81+
 82+http://phpmailer.sourceforge.net/
 83+
 84+This software is licenced under the LGPL. Please read LICENSE for information on the
 85+software availability and distribution.
 86+
 87+Class Features:
 88+- Send emails with multiple TOs, CCs, BCCs and REPLY-TOs
 89+- Redundant SMTP servers
 90+- Multipart/alternative emails for mail clients that do not read HTML email
 91+- Support for 8bit, base64, binary, and quoted-printable encoding
 92+- Uses the same methods as the very popular AspEmail active server (COM) component
 93+- SMTP authentication
 94+- Native language support
 95+- Word wrap, and more!
 96+
 97+Why you might need it:
 98+
 99+Many PHP developers utilize email in their code. The only PHP function
 100+that supports this is the mail() function. However, it does not expose
 101+any of the popular features that many email clients use nowadays like
 102+HTML-based emails and attachments. There are two proprietary
 103+development tools out there that have all the functionality built into
 104+easy to use classes: AspEmail(tm) and AspMail. Both of these
 105+programs are COM components only available on Windows. They are also a
 106+little pricey for smaller projects.
 107+
 108+Since I do Linux development I�ve missed these tools for my PHP coding.
 109+So I built a version myself that implements the same methods (object
 110+calls) that the Windows-based components do. It is open source and the
 111+LGPL license allows you to place the class in your proprietary PHP
 112+projects.
 113+
 114+
 115+Installation:
 116+
 117+Copy class.phpmailer.php into your php.ini include_path. If you are
 118+using the SMTP mailer then place class.smtp.php in your path as well.
 119+In the language directory you will find several files like
 120+phpmailer.lang-en.php. If you look right before the .php extension
 121+that there are two letters. These represent the language type of the
 122+translation file. For instance "en" is the English file and "br" is
 123+the Portuguese file. Chose the file that best fits with your language
 124+and place it in the PHP include path. If your language is English
 125+then you have nothing more to do. If it is a different language then
 126+you must point PHPMailer to the correct translation. To do this, call
 127+the PHPMailer SetLanguage method like so:
 128+
 129+// To load the Portuguese version
 130+$mail->SetLanguage("br", "/optional/path/to/language/directory/");
 131+
 132+That's it. You should now be ready to use PHPMailer!
 133+
 134+
 135+A Simple Example:
 136+
 137+<?php
 138+require("class.phpmailer.php");
 139+
 140+$mail = new PHPMailer();
 141+
 142+$mail->IsSMTP(); // set mailer to use SMTP
 143+$mail->Host = "smtp1.example.com;smtp2.example.com"; // specify main and backup server
 144+$mail->SMTPAuth = true; // turn on SMTP authentication
 145+$mail->Username = "jswan"; // SMTP username
 146+$mail->Password = "secret"; // SMTP password
 147+
 148+$mail->From = "from@example.com";
 149+$mail->FromName = "Mailer";
 150+$mail->AddAddress("josh@example.net", "Josh Adams");
 151+$mail->AddAddress("ellen@example.com"); // name is optional
 152+$mail->AddReplyTo("info@example.com", "Information");
 153+
 154+$mail->WordWrap = 50; // set word wrap to 50 characters
 155+$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments
 156+$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
 157+$mail->IsHTML(true); // set email format to HTML
 158+
 159+$mail->Subject = "Here is the subject";
 160+$mail->Body = "This is the HTML message body <b>in bold!</b>";
 161+$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
 162+
 163+if(!$mail->Send())
 164+{
 165+ echo "Message could not be sent. <p>";
 166+ echo "Mailer Error: " . $mail->ErrorInfo;
 167+ exit;
 168+}
 169+
 170+echo "Message has been sent";
 171+?>
 172+
 173+CHANGELOG
 174+
 175+See ChangeLog.txt
 176+
 177+Download: http://sourceforge.net/project/showfiles.php?group_id=26031
 178+
 179+Andy Prevost
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/README
___________________________________________________________________
Added: svn:eol-style
1180 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/class.smtp.php
@@ -0,0 +1,1113 @@
 2+<?php
 3+/*~ class.smtp.php
 4+.---------------------------------------------------------------------------.
 5+| Software: PHPMailer - PHP email class |
 6+| Version: 2.1 |
 7+| Contact: via sourceforge.net support pages (also www.codeworxtech.com) |
 8+| Info: http://phpmailer.sourceforge.net |
 9+| Support: http://sourceforge.net/projects/phpmailer/ |
 10+| ------------------------------------------------------------------------- |
 11+| Author: Andy Prevost (project admininistrator) |
 12+| Author: Brent R. Matzelle (original founder) |
 13+| Copyright (c) 2004-2007, Andy Prevost. All Rights Reserved. |
 14+| Copyright (c) 2001-2003, Brent R. Matzelle |
 15+| ------------------------------------------------------------------------- |
 16+| License: Distributed under the Lesser General Public License (LGPL) |
 17+| http://www.gnu.org/copyleft/lesser.html |
 18+| This program is distributed in the hope that it will be useful - WITHOUT |
 19+| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
 20+| FITNESS FOR A PARTICULAR PURPOSE. |
 21+| ------------------------------------------------------------------------- |
 22+| We offer a number of paid services (www.codeworxtech.com): |
 23+| - Web Hosting on highly optimized fast and secure servers |
 24+| - Technology Consulting |
 25+| - Oursourcing (highly qualified programmers and graphic designers) |
 26+'---------------------------------------------------------------------------'
 27+
 28+/**
 29+ * SMTP is rfc 821 compliant and implements all the rfc 821 SMTP
 30+ * commands except TURN which will always return a not implemented
 31+ * error. SMTP also provides some utility methods for sending mail
 32+ * to an SMTP server.
 33+ * @package PHPMailer
 34+ * @author Chris Ryan
 35+ */
 36+
 37+class SMTP {
 38+ /**
 39+ * SMTP server port
 40+ * @var int
 41+ */
 42+ public $SMTP_PORT = 25;
 43+
 44+ /**
 45+ * SMTP reply line ending
 46+ * @var string
 47+ */
 48+ public $CRLF = "\r\n";
 49+
 50+ /**
 51+ * Sets whether debugging is turned on
 52+ * @var bool
 53+ */
 54+ public $do_debug; // the level of debug to perform
 55+
 56+ /**
 57+ * Sets VERP use on/off (default is off)
 58+ * @var bool
 59+ */
 60+ public $do_verp = false;
 61+
 62+ /**#@+
 63+ * @access private
 64+ */
 65+ private $smtp_conn; // the socket to the server
 66+ private $error; // error if any on the last call
 67+ private $helo_rply; // the reply the server sent to us for HELO
 68+ /**#@-*/
 69+
 70+ /**
 71+ * Initialize the class so that the data is in a known state.
 72+ * @access public
 73+ * @return void
 74+ */
 75+ public function __construct() {
 76+ $this->smtp_conn = 0;
 77+ $this->error = null;
 78+ $this->helo_rply = null;
 79+
 80+ $this->do_debug = 0;
 81+ }
 82+
 83+ /*************************************************************
 84+ * CONNECTION FUNCTIONS *
 85+ ***********************************************************/
 86+
 87+ /**
 88+ * Connect to the server specified on the port specified.
 89+ * If the port is not specified use the default SMTP_PORT.
 90+ * If tval is specified then a connection will try and be
 91+ * established with the server for that number of seconds.
 92+ * If tval is not specified the default is 30 seconds to
 93+ * try on the connection.
 94+ *
 95+ * SMTP CODE SUCCESS: 220
 96+ * SMTP CODE FAILURE: 421
 97+ * @access public
 98+ * @return bool
 99+ */
 100+ public function Connect($host,$port=0,$tval=30) {
 101+ /* set the error val to null so there is no confusion */
 102+ $this->error = null;
 103+
 104+ /* make sure we are __not__ connected */
 105+ if($this->connected()) {
 106+ /* ok we are connected! what should we do?
 107+ * for now we will just give an error saying we
 108+ * are already connected
 109+ */
 110+ $this->error = array("error" => "Already connected to a server");
 111+ return false;
 112+ }
 113+
 114+ if(empty($port)) {
 115+ $port = $this->SMTP_PORT;
 116+ }
 117+
 118+ /* connect to the smtp server */
 119+ $this->smtp_conn = fsockopen($host, // the host of the server
 120+ $port, // the port to use
 121+ $errno, // error number if any
 122+ $errstr, // error message if any
 123+ $tval); // give up after ? secs
 124+ /* verify we connected properly */
 125+ if(empty($this->smtp_conn)) {
 126+ $this->error = array("error" => "Failed to connect to server",
 127+ "errno" => $errno,
 128+ "errstr" => $errstr);
 129+ if($this->do_debug >= 1) {
 130+ echo "SMTP -> ERROR: " . $this->error["error"] .
 131+ ": $errstr ($errno)" . $this->CRLF;
 132+ }
 133+ return false;
 134+ }
 135+
 136+ /* sometimes the SMTP server takes a little longer to respond
 137+ * so we will give it a longer timeout for the first read
 138+ * - Windows still does not have support for this timeout function
 139+ */
 140+ if(substr(PHP_OS, 0, 3) != "WIN")
 141+ socket_set_timeout($this->smtp_conn, $tval, 0);
 142+
 143+ /* get any announcement stuff */
 144+ $announce = $this->get_lines();
 145+
 146+ /* set the timeout of any socket functions at 1/10 of a second */
 147+ //if(function_exists("socket_set_timeout"))
 148+ // socket_set_timeout($this->smtp_conn, 0, 100000);
 149+
 150+ if($this->do_debug >= 2) {
 151+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $announce;
 152+ }
 153+
 154+ return true;
 155+ }
 156+
 157+ /**
 158+ * Initiate a TSL communication with the server.
 159+ *
 160+ * SMTP CODE 220 Ready to start TLS
 161+ * SMTP CODE 501 Syntax error (no parameters allowed)
 162+ * SMTP CODE 454 TLS not available due to temporary reason
 163+ * @access public
 164+ * @return bool success
 165+ */
 166+ public function StartTLS() {
 167+ $this->error = null; # to avoid confusion
 168+
 169+ if(!$this->connected()) {
 170+ $this->error = array("error" => "Called StartTLS() without being connected");
 171+ return false;
 172+ }
 173+
 174+ fputs($this->smtp_conn,"STARTTLS" . $extra . $this->CRLF);
 175+
 176+ $rply = $this->get_lines();
 177+ $code = substr($rply,0,3);
 178+
 179+ if($this->do_debug >= 2) {
 180+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 181+ }
 182+
 183+ if($code != 220) {
 184+ $this->error =
 185+ array("error" => "STARTTLS not accepted from server",
 186+ "smtp_code" => $code,
 187+ "smtp_msg" => substr($rply,4));
 188+ if($this->do_debug >= 1) {
 189+ echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF;
 190+ }
 191+ return false;
 192+ }
 193+
 194+ //Begin encrypted connection
 195+ if(!stream_socket_enable_crypto($this->smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
 196+ return false;
 197+ }
 198+
 199+ return true;
 200+ }
 201+
 202+ /**
 203+ * Performs SMTP authentication. Must be run after running the
 204+ * Hello() method. Returns true if successfully authenticated.
 205+ * @access public
 206+ * @return bool
 207+ */
 208+ public function Authenticate($username, $password) {
 209+ // Start authentication
 210+ fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);
 211+
 212+ $rply = $this->get_lines();
 213+ $code = substr($rply,0,3);
 214+
 215+ if($code != 334) {
 216+ $this->error =
 217+ array("error" => "AUTH not accepted from server",
 218+ "smtp_code" => $code,
 219+ "smtp_msg" => substr($rply,4));
 220+ if($this->do_debug >= 1) {
 221+ echo "SMTP -> ERROR: " . $this->error["error"] .
 222+ ": " . $rply . $this->CRLF;
 223+ }
 224+ return false;
 225+ }
 226+
 227+ // Send encoded username
 228+ fputs($this->smtp_conn, base64_encode($username) . $this->CRLF);
 229+
 230+ $rply = $this->get_lines();
 231+ $code = substr($rply,0,3);
 232+
 233+ if($code != 334) {
 234+ $this->error =
 235+ array("error" => "Username not accepted from server",
 236+ "smtp_code" => $code,
 237+ "smtp_msg" => substr($rply,4));
 238+ if($this->do_debug >= 1) {
 239+ echo "SMTP -> ERROR: " . $this->error["error"] .
 240+ ": " . $rply . $this->CRLF;
 241+ }
 242+ return false;
 243+ }
 244+
 245+ // Send encoded password
 246+ fputs($this->smtp_conn, base64_encode($password) . $this->CRLF);
 247+
 248+ $rply = $this->get_lines();
 249+ $code = substr($rply,0,3);
 250+
 251+ if($code != 235) {
 252+ $this->error =
 253+ array("error" => "Password not accepted from server",
 254+ "smtp_code" => $code,
 255+ "smtp_msg" => substr($rply,4));
 256+ if($this->do_debug >= 1) {
 257+ echo "SMTP -> ERROR: " . $this->error["error"] .
 258+ ": " . $rply . $this->CRLF;
 259+ }
 260+ return false;
 261+ }
 262+
 263+ return true;
 264+ }
 265+
 266+ /**
 267+ * Returns true if connected to a server otherwise false
 268+ * @access public
 269+ * @return bool
 270+ */
 271+ public function Connected() {
 272+ if(!empty($this->smtp_conn)) {
 273+ $sock_status = socket_get_status($this->smtp_conn);
 274+ if($sock_status["eof"]) {
 275+ // hmm this is an odd situation... the socket is
 276+ // valid but we are not connected anymore
 277+ if($this->do_debug >= 1) {
 278+ echo "SMTP -> NOTICE:" . $this->CRLF .
 279+ "EOF caught while checking if connected";
 280+ }
 281+ $this->Close();
 282+ return false;
 283+ }
 284+ return true; // everything looks good
 285+ }
 286+ return false;
 287+ }
 288+
 289+ /**
 290+ * Closes the socket and cleans up the state of the class.
 291+ * It is not considered good to use this function without
 292+ * first trying to use QUIT.
 293+ * @access public
 294+ * @return void
 295+ */
 296+ public function Close() {
 297+ $this->error = null; // so there is no confusion
 298+ $this->helo_rply = null;
 299+ if(!empty($this->smtp_conn)) {
 300+ // close the connection and cleanup
 301+ fclose($this->smtp_conn);
 302+ $this->smtp_conn = 0;
 303+ }
 304+ }
 305+
 306+ /***************************************************************
 307+ * SMTP COMMANDS *
 308+ *************************************************************/
 309+
 310+ /**
 311+ * Issues a data command and sends the msg_data to the server
 312+ * finializing the mail transaction. $msg_data is the message
 313+ * that is to be send with the headers. Each header needs to be
 314+ * on a single line followed by a <CRLF> with the message headers
 315+ * and the message body being seperated by and additional <CRLF>.
 316+ *
 317+ * Implements rfc 821: DATA <CRLF>
 318+ *
 319+ * SMTP CODE INTERMEDIATE: 354
 320+ * [data]
 321+ * <CRLF>.<CRLF>
 322+ * SMTP CODE SUCCESS: 250
 323+ * SMTP CODE FAILURE: 552,554,451,452
 324+ * SMTP CODE FAILURE: 451,554
 325+ * SMTP CODE ERROR : 500,501,503,421
 326+ * @access public
 327+ * @return bool
 328+ */
 329+ public function Data($msg_data) {
 330+ $this->error = null; // so no confusion is caused
 331+
 332+ if(!$this->connected()) {
 333+ $this->error = array(
 334+ "error" => "Called Data() without being connected");
 335+ return false;
 336+ }
 337+
 338+ fputs($this->smtp_conn,"DATA" . $this->CRLF);
 339+
 340+ $rply = $this->get_lines();
 341+ $code = substr($rply,0,3);
 342+
 343+ if($this->do_debug >= 2) {
 344+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 345+ }
 346+
 347+ if($code != 354) {
 348+ $this->error =
 349+ array("error" => "DATA command not accepted from server",
 350+ "smtp_code" => $code,
 351+ "smtp_msg" => substr($rply,4));
 352+ if($this->do_debug >= 1) {
 353+ echo "SMTP -> ERROR: " . $this->error["error"] .
 354+ ": " . $rply . $this->CRLF;
 355+ }
 356+ return false;
 357+ }
 358+
 359+ /* the server is ready to accept data!
 360+ * according to rfc 821 we should not send more than 1000
 361+ * including the CRLF
 362+ * characters on a single line so we will break the data up
 363+ * into lines by \r and/or \n then if needed we will break
 364+ * each of those into smaller lines to fit within the limit.
 365+ * in addition we will be looking for lines that start with
 366+ * a period '.' and append and additional period '.' to that
 367+ * line. NOTE: this does not count towards are limit.
 368+ */
 369+
 370+ // normalize the line breaks so we know the explode works
 371+ $msg_data = str_replace("\r\n","\n",$msg_data);
 372+ $msg_data = str_replace("\r","\n",$msg_data);
 373+ $lines = explode("\n",$msg_data);
 374+
 375+ /* we need to find a good way to determine is headers are
 376+ * in the msg_data or if it is a straight msg body
 377+ * currently I am assuming rfc 822 definitions of msg headers
 378+ * and if the first field of the first line (':' sperated)
 379+ * does not contain a space then it _should_ be a header
 380+ * and we can process all lines before a blank "" line as
 381+ * headers.
 382+ */
 383+ $field = substr($lines[0],0,strpos($lines[0],":"));
 384+ $in_headers = false;
 385+ if(!empty($field) && !strstr($field," ")) {
 386+ $in_headers = true;
 387+ }
 388+
 389+ $max_line_length = 998; // used below; set here for ease in change
 390+
 391+ while(list(,$line) = @each($lines)) {
 392+ $lines_out = null;
 393+ if($line == "" && $in_headers) {
 394+ $in_headers = false;
 395+ }
 396+ // ok we need to break this line up into several smaller lines
 397+ while(strlen($line) > $max_line_length) {
 398+ $pos = strrpos(substr($line,0,$max_line_length)," ");
 399+
 400+ // Patch to fix DOS attack
 401+ if(!$pos) {
 402+ $pos = $max_line_length - 1;
 403+ $lines_out[] = substr($line,0,$pos);
 404+ $line = substr($line,$pos);
 405+ } else {
 406+ $lines_out[] = substr($line,0,$pos);
 407+ $line = substr($line,$pos + 1);
 408+ }
 409+
 410+ /* if we are processing headers we need to
 411+ * add a LWSP-char to the front of the new line
 412+ * rfc 822 on long msg headers
 413+ */
 414+ if($in_headers) {
 415+ $line = "\t" . $line;
 416+ }
 417+ }
 418+ $lines_out[] = $line;
 419+
 420+ // now send the lines to the server
 421+ while(list(,$line_out) = @each($lines_out)) {
 422+ if(strlen($line_out) > 0)
 423+ {
 424+ if(substr($line_out, 0, 1) == ".") {
 425+ $line_out = "." . $line_out;
 426+ }
 427+ }
 428+ fputs($this->smtp_conn,$line_out . $this->CRLF);
 429+ }
 430+ }
 431+
 432+ // ok all the message data has been sent so lets get this
 433+ // over with aleady
 434+ fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF);
 435+
 436+ $rply = $this->get_lines();
 437+ $code = substr($rply,0,3);
 438+
 439+ if($this->do_debug >= 2) {
 440+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 441+ }
 442+
 443+ if($code != 250) {
 444+ $this->error =
 445+ array("error" => "DATA not accepted from server",
 446+ "smtp_code" => $code,
 447+ "smtp_msg" => substr($rply,4));
 448+ if($this->do_debug >= 1) {
 449+ echo "SMTP -> ERROR: " . $this->error["error"] .
 450+ ": " . $rply . $this->CRLF;
 451+ }
 452+ return false;
 453+ }
 454+ return true;
 455+ }
 456+
 457+ /**
 458+ * Expand takes the name and asks the server to list all the
 459+ * people who are members of the _list_. Expand will return
 460+ * back and array of the result or false if an error occurs.
 461+ * Each value in the array returned has the format of:
 462+ * [ <full-name> <sp> ] <path>
 463+ * The definition of <path> is defined in rfc 821
 464+ *
 465+ * Implements rfc 821: EXPN <SP> <string> <CRLF>
 466+ *
 467+ * SMTP CODE SUCCESS: 250
 468+ * SMTP CODE FAILURE: 550
 469+ * SMTP CODE ERROR : 500,501,502,504,421
 470+ * @access public
 471+ * @return string array
 472+ */
 473+ public function Expand($name) {
 474+ $this->error = null; // so no confusion is caused
 475+
 476+ if(!$this->connected()) {
 477+ $this->error = array(
 478+ "error" => "Called Expand() without being connected");
 479+ return false;
 480+ }
 481+
 482+ fputs($this->smtp_conn,"EXPN " . $name . $this->CRLF);
 483+
 484+ $rply = $this->get_lines();
 485+ $code = substr($rply,0,3);
 486+
 487+ if($this->do_debug >= 2) {
 488+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 489+ }
 490+
 491+ if($code != 250) {
 492+ $this->error =
 493+ array("error" => "EXPN not accepted from server",
 494+ "smtp_code" => $code,
 495+ "smtp_msg" => substr($rply,4));
 496+ if($this->do_debug >= 1) {
 497+ echo "SMTP -> ERROR: " . $this->error["error"] .
 498+ ": " . $rply . $this->CRLF;
 499+ }
 500+ return false;
 501+ }
 502+
 503+ // parse the reply and place in our array to return to user
 504+ $entries = explode($this->CRLF,$rply);
 505+ while(list(,$l) = @each($entries)) {
 506+ $list[] = substr($l,4);
 507+ }
 508+
 509+ return $list;
 510+ }
 511+
 512+ /**
 513+ * Sends the HELO command to the smtp server.
 514+ * This makes sure that we and the server are in
 515+ * the same known state.
 516+ *
 517+ * Implements from rfc 821: HELO <SP> <domain> <CRLF>
 518+ *
 519+ * SMTP CODE SUCCESS: 250
 520+ * SMTP CODE ERROR : 500, 501, 504, 421
 521+ * @access public
 522+ * @return bool
 523+ */
 524+ public function Hello($host="") {
 525+ $this->error = null; // so no confusion is caused
 526+
 527+ if(!$this->connected()) {
 528+ $this->error = array(
 529+ "error" => "Called Hello() without being connected");
 530+ return false;
 531+ }
 532+
 533+ // if a hostname for the HELO was not specified determine
 534+ //a suitable one to send
 535+ if(empty($host)) {
 536+ // we need to determine some sort of appopiate default
 537+ // to send to the server
 538+ $host = "localhost";
 539+ }
 540+
 541+ // Send extended hello first (RFC 2821)
 542+ if(!$this->SendHello("EHLO", $host))
 543+ {
 544+ if(!$this->SendHello("HELO", $host))
 545+ return false;
 546+ }
 547+
 548+ return true;
 549+ }
 550+
 551+ /**
 552+ * Sends a HELO/EHLO command.
 553+ * @access private
 554+ * @return bool
 555+ */
 556+ private function SendHello($hello, $host) {
 557+ fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF);
 558+
 559+ $rply = $this->get_lines();
 560+ $code = substr($rply,0,3);
 561+
 562+ if($this->do_debug >= 2) {
 563+ echo "SMTP -> FROM SERVER: " . $this->CRLF . $rply;
 564+ }
 565+
 566+ if($code != 250) {
 567+ $this->error =
 568+ array("error" => $hello . " not accepted from server",
 569+ "smtp_code" => $code,
 570+ "smtp_msg" => substr($rply,4));
 571+ if($this->do_debug >= 1) {
 572+ echo "SMTP -> ERROR: " . $this->error["error"] .
 573+ ": " . $rply . $this->CRLF;
 574+ }
 575+ return false;
 576+ }
 577+
 578+ $this->helo_rply = $rply;
 579+
 580+ return true;
 581+ }
 582+
 583+ /**
 584+ * Gets help information on the keyword specified. If the keyword
 585+ * is not specified then returns generic help, ussually contianing
 586+ * A list of keywords that help is available on. This function
 587+ * returns the results back to the user. It is up to the user to
 588+ * handle the returned data. If an error occurs then false is
 589+ * returned with $this->error set appropiately.
 590+ *
 591+ * Implements rfc 821: HELP [ <SP> <string> ] <CRLF>
 592+ *
 593+ * SMTP CODE SUCCESS: 211,214
 594+ * SMTP CODE ERROR : 500,501,502,504,421
 595+ * @access public
 596+ * @return string
 597+ */
 598+ public function Help($keyword="") {
 599+ $this->error = null; // to avoid confusion
 600+
 601+ if(!$this->connected()) {
 602+ $this->error = array(
 603+ "error" => "Called Help() without being connected");
 604+ return false;
 605+ }
 606+
 607+ $extra = "";
 608+ if(!empty($keyword)) {
 609+ $extra = " " . $keyword;
 610+ }
 611+
 612+ fputs($this->smtp_conn,"HELP" . $extra . $this->CRLF);
 613+
 614+ $rply = $this->get_lines();
 615+ $code = substr($rply,0,3);
 616+
 617+ if($this->do_debug >= 2) {
 618+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 619+ }
 620+
 621+ if($code != 211 && $code != 214) {
 622+ $this->error =
 623+ array("error" => "HELP not accepted from server",
 624+ "smtp_code" => $code,
 625+ "smtp_msg" => substr($rply,4));
 626+ if($this->do_debug >= 1) {
 627+ echo "SMTP -> ERROR: " . $this->error["error"] .
 628+ ": " . $rply . $this->CRLF;
 629+ }
 630+ return false;
 631+ }
 632+
 633+ return $rply;
 634+ }
 635+
 636+ /**
 637+ * Starts a mail transaction from the email address specified in
 638+ * $from. Returns true if successful or false otherwise. If True
 639+ * the mail transaction is started and then one or more Recipient
 640+ * commands may be called followed by a Data command.
 641+ *
 642+ * Implements rfc 821: MAIL <SP> FROM:<reverse-path> <CRLF>
 643+ *
 644+ * SMTP CODE SUCCESS: 250
 645+ * SMTP CODE SUCCESS: 552,451,452
 646+ * SMTP CODE SUCCESS: 500,501,421
 647+ * @access public
 648+ * @return bool
 649+ */
 650+ public function Mail($from) {
 651+ $this->error = null; // so no confusion is caused
 652+
 653+ if(!$this->connected()) {
 654+ $this->error = array(
 655+ "error" => "Called Mail() without being connected");
 656+ return false;
 657+ }
 658+
 659+ $useVerp = ($this->do_verp ? "XVERP" : "");
 660+ fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $useVerp . $this->CRLF);
 661+
 662+ $rply = $this->get_lines();
 663+ $code = substr($rply,0,3);
 664+
 665+ if($this->do_debug >= 2) {
 666+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 667+ }
 668+
 669+ if($code != 250) {
 670+ $this->error =
 671+ array("error" => "MAIL not accepted from server",
 672+ "smtp_code" => $code,
 673+ "smtp_msg" => substr($rply,4));
 674+ if($this->do_debug >= 1) {
 675+ echo "SMTP -> ERROR: " . $this->error["error"] .
 676+ ": " . $rply . $this->CRLF;
 677+ }
 678+ return false;
 679+ }
 680+ return true;
 681+ }
 682+
 683+ /**
 684+ * Sends the command NOOP to the SMTP server.
 685+ *
 686+ * Implements from rfc 821: NOOP <CRLF>
 687+ *
 688+ * SMTP CODE SUCCESS: 250
 689+ * SMTP CODE ERROR : 500, 421
 690+ * @access public
 691+ * @return bool
 692+ */
 693+ public function Noop() {
 694+ $this->error = null; // so no confusion is caused
 695+
 696+ if(!$this->connected()) {
 697+ $this->error = array(
 698+ "error" => "Called Noop() without being connected");
 699+ return false;
 700+ }
 701+
 702+ fputs($this->smtp_conn,"NOOP" . $this->CRLF);
 703+
 704+ $rply = $this->get_lines();
 705+ $code = substr($rply,0,3);
 706+
 707+ if($this->do_debug >= 2) {
 708+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 709+ }
 710+
 711+ if($code != 250) {
 712+ $this->error =
 713+ array("error" => "NOOP not accepted from server",
 714+ "smtp_code" => $code,
 715+ "smtp_msg" => substr($rply,4));
 716+ if($this->do_debug >= 1) {
 717+ echo "SMTP -> ERROR: " . $this->error["error"] .
 718+ ": " . $rply . $this->CRLF;
 719+ }
 720+ return false;
 721+ }
 722+ return true;
 723+ }
 724+
 725+ /**
 726+ * Sends the quit command to the server and then closes the socket
 727+ * if there is no error or the $close_on_error argument is true.
 728+ *
 729+ * Implements from rfc 821: QUIT <CRLF>
 730+ *
 731+ * SMTP CODE SUCCESS: 221
 732+ * SMTP CODE ERROR : 500
 733+ * @access public
 734+ * @return bool
 735+ */
 736+ public function Quit($close_on_error=true) {
 737+ $this->error = null; // so there is no confusion
 738+
 739+ if(!$this->connected()) {
 740+ $this->error = array(
 741+ "error" => "Called Quit() without being connected");
 742+ return false;
 743+ }
 744+
 745+ // send the quit command to the server
 746+ fputs($this->smtp_conn,"quit" . $this->CRLF);
 747+
 748+ // get any good-bye messages
 749+ $byemsg = $this->get_lines();
 750+
 751+ if($this->do_debug >= 2) {
 752+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $byemsg;
 753+ }
 754+
 755+ $rval = true;
 756+ $e = null;
 757+
 758+ $code = substr($byemsg,0,3);
 759+ if($code != 221) {
 760+ // use e as a tmp var cause Close will overwrite $this->error
 761+ $e = array("error" => "SMTP server rejected quit command",
 762+ "smtp_code" => $code,
 763+ "smtp_rply" => substr($byemsg,4));
 764+ $rval = false;
 765+ if($this->do_debug >= 1) {
 766+ echo "SMTP -> ERROR: " . $e["error"] . ": " .
 767+ $byemsg . $this->CRLF;
 768+ }
 769+ }
 770+
 771+ if(empty($e) || $close_on_error) {
 772+ $this->Close();
 773+ }
 774+
 775+ return $rval;
 776+ }
 777+
 778+ /**
 779+ * Sends the command RCPT to the SMTP server with the TO: argument of $to.
 780+ * Returns true if the recipient was accepted false if it was rejected.
 781+ *
 782+ * Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
 783+ *
 784+ * SMTP CODE SUCCESS: 250,251
 785+ * SMTP CODE FAILURE: 550,551,552,553,450,451,452
 786+ * SMTP CODE ERROR : 500,501,503,421
 787+ * @access public
 788+ * @return bool
 789+ */
 790+ public function Recipient($to) {
 791+ $this->error = null; // so no confusion is caused
 792+
 793+ if(!$this->connected()) {
 794+ $this->error = array(
 795+ "error" => "Called Recipient() without being connected");
 796+ return false;
 797+ }
 798+
 799+ fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF);
 800+
 801+ $rply = $this->get_lines();
 802+ $code = substr($rply,0,3);
 803+
 804+ if($this->do_debug >= 2) {
 805+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 806+ }
 807+
 808+ if($code != 250 && $code != 251) {
 809+ $this->error =
 810+ array("error" => "RCPT not accepted from server",
 811+ "smtp_code" => $code,
 812+ "smtp_msg" => substr($rply,4));
 813+ if($this->do_debug >= 1) {
 814+ echo "SMTP -> ERROR: " . $this->error["error"] .
 815+ ": " . $rply . $this->CRLF;
 816+ }
 817+ return false;
 818+ }
 819+ return true;
 820+ }
 821+
 822+ /**
 823+ * Sends the RSET command to abort and transaction that is
 824+ * currently in progress. Returns true if successful false
 825+ * otherwise.
 826+ *
 827+ * Implements rfc 821: RSET <CRLF>
 828+ *
 829+ * SMTP CODE SUCCESS: 250
 830+ * SMTP CODE ERROR : 500,501,504,421
 831+ * @access public
 832+ * @return bool
 833+ */
 834+ public function Reset() {
 835+ $this->error = null; // so no confusion is caused
 836+
 837+ if(!$this->connected()) {
 838+ $this->error = array(
 839+ "error" => "Called Reset() without being connected");
 840+ return false;
 841+ }
 842+
 843+ fputs($this->smtp_conn,"RSET" . $this->CRLF);
 844+
 845+ $rply = $this->get_lines();
 846+ $code = substr($rply,0,3);
 847+
 848+ if($this->do_debug >= 2) {
 849+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 850+ }
 851+
 852+ if($code != 250) {
 853+ $this->error =
 854+ array("error" => "RSET failed",
 855+ "smtp_code" => $code,
 856+ "smtp_msg" => substr($rply,4));
 857+ if($this->do_debug >= 1) {
 858+ echo "SMTP -> ERROR: " . $this->error["error"] .
 859+ ": " . $rply . $this->CRLF;
 860+ }
 861+ return false;
 862+ }
 863+
 864+ return true;
 865+ }
 866+
 867+ /**
 868+ * Starts a mail transaction from the email address specified in
 869+ * $from. Returns true if successful or false otherwise. If True
 870+ * the mail transaction is started and then one or more Recipient
 871+ * commands may be called followed by a Data command. This command
 872+ * will send the message to the users terminal if they are logged
 873+ * in.
 874+ *
 875+ * Implements rfc 821: SEND <SP> FROM:<reverse-path> <CRLF>
 876+ *
 877+ * SMTP CODE SUCCESS: 250
 878+ * SMTP CODE SUCCESS: 552,451,452
 879+ * SMTP CODE SUCCESS: 500,501,502,421
 880+ * @access public
 881+ * @return bool
 882+ */
 883+ public function Send($from) {
 884+ $this->error = null; // so no confusion is caused
 885+
 886+ if(!$this->connected()) {
 887+ $this->error = array(
 888+ "error" => "Called Send() without being connected");
 889+ return false;
 890+ }
 891+
 892+ fputs($this->smtp_conn,"SEND FROM:" . $from . $this->CRLF);
 893+
 894+ $rply = $this->get_lines();
 895+ $code = substr($rply,0,3);
 896+
 897+ if($this->do_debug >= 2) {
 898+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 899+ }
 900+
 901+ if($code != 250) {
 902+ $this->error =
 903+ array("error" => "SEND not accepted from server",
 904+ "smtp_code" => $code,
 905+ "smtp_msg" => substr($rply,4));
 906+ if($this->do_debug >= 1) {
 907+ echo "SMTP -> ERROR: " . $this->error["error"] .
 908+ ": " . $rply . $this->CRLF;
 909+ }
 910+ return false;
 911+ }
 912+ return true;
 913+ }
 914+
 915+ /**
 916+ * Starts a mail transaction from the email address specified in
 917+ * $from. Returns true if successful or false otherwise. If True
 918+ * the mail transaction is started and then one or more Recipient
 919+ * commands may be called followed by a Data command. This command
 920+ * will send the message to the users terminal if they are logged
 921+ * in and send them an email.
 922+ *
 923+ * Implements rfc 821: SAML <SP> FROM:<reverse-path> <CRLF>
 924+ *
 925+ * SMTP CODE SUCCESS: 250
 926+ * SMTP CODE SUCCESS: 552,451,452
 927+ * SMTP CODE SUCCESS: 500,501,502,421
 928+ * @access public
 929+ * @return bool
 930+ */
 931+ public function SendAndMail($from) {
 932+ $this->error = null; // so no confusion is caused
 933+
 934+ if(!$this->connected()) {
 935+ $this->error = array(
 936+ "error" => "Called SendAndMail() without being connected");
 937+ return false;
 938+ }
 939+
 940+ fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF);
 941+
 942+ $rply = $this->get_lines();
 943+ $code = substr($rply,0,3);
 944+
 945+ if($this->do_debug >= 2) {
 946+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 947+ }
 948+
 949+ if($code != 250) {
 950+ $this->error =
 951+ array("error" => "SAML not accepted from server",
 952+ "smtp_code" => $code,
 953+ "smtp_msg" => substr($rply,4));
 954+ if($this->do_debug >= 1) {
 955+ echo "SMTP -> ERROR: " . $this->error["error"] .
 956+ ": " . $rply . $this->CRLF;
 957+ }
 958+ return false;
 959+ }
 960+ return true;
 961+ }
 962+
 963+ /**
 964+ * Starts a mail transaction from the email address specified in
 965+ * $from. Returns true if successful or false otherwise. If True
 966+ * the mail transaction is started and then one or more Recipient
 967+ * commands may be called followed by a Data command. This command
 968+ * will send the message to the users terminal if they are logged
 969+ * in or mail it to them if they are not.
 970+ *
 971+ * Implements rfc 821: SOML <SP> FROM:<reverse-path> <CRLF>
 972+ *
 973+ * SMTP CODE SUCCESS: 250
 974+ * SMTP CODE SUCCESS: 552,451,452
 975+ * SMTP CODE SUCCESS: 500,501,502,421
 976+ * @access public
 977+ * @return bool
 978+ */
 979+ public function SendOrMail($from) {
 980+ $this->error = null; // so no confusion is caused
 981+
 982+ if(!$this->connected()) {
 983+ $this->error = array(
 984+ "error" => "Called SendOrMail() without being connected");
 985+ return false;
 986+ }
 987+
 988+ fputs($this->smtp_conn,"SOML FROM:" . $from . $this->CRLF);
 989+
 990+ $rply = $this->get_lines();
 991+ $code = substr($rply,0,3);
 992+
 993+ if($this->do_debug >= 2) {
 994+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 995+ }
 996+
 997+ if($code != 250) {
 998+ $this->error =
 999+ array("error" => "SOML not accepted from server",
 1000+ "smtp_code" => $code,
 1001+ "smtp_msg" => substr($rply,4));
 1002+ if($this->do_debug >= 1) {
 1003+ echo "SMTP -> ERROR: " . $this->error["error"] .
 1004+ ": " . $rply . $this->CRLF;
 1005+ }
 1006+ return false;
 1007+ }
 1008+ return true;
 1009+ }
 1010+
 1011+ /**
 1012+ * This is an optional command for SMTP that this class does not
 1013+ * support. This method is here to make the RFC821 Definition
 1014+ * complete for this class and __may__ be implimented in the future
 1015+ *
 1016+ * Implements from rfc 821: TURN <CRLF>
 1017+ *
 1018+ * SMTP CODE SUCCESS: 250
 1019+ * SMTP CODE FAILURE: 502
 1020+ * SMTP CODE ERROR : 500, 503
 1021+ * @access public
 1022+ * @return bool
 1023+ */
 1024+ public function Turn() {
 1025+ $this->error = array("error" => "This method, TURN, of the SMTP ".
 1026+ "is not implemented");
 1027+ if($this->do_debug >= 1) {
 1028+ echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF;
 1029+ }
 1030+ return false;
 1031+ }
 1032+
 1033+ /**
 1034+ * Verifies that the name is recognized by the server.
 1035+ * Returns false if the name could not be verified otherwise
 1036+ * the response from the server is returned.
 1037+ *
 1038+ * Implements rfc 821: VRFY <SP> <string> <CRLF>
 1039+ *
 1040+ * SMTP CODE SUCCESS: 250,251
 1041+ * SMTP CODE FAILURE: 550,551,553
 1042+ * SMTP CODE ERROR : 500,501,502,421
 1043+ * @access public
 1044+ * @return int
 1045+ */
 1046+ public function Verify($name) {
 1047+ $this->error = null; // so no confusion is caused
 1048+
 1049+ if(!$this->connected()) {
 1050+ $this->error = array(
 1051+ "error" => "Called Verify() without being connected");
 1052+ return false;
 1053+ }
 1054+
 1055+ fputs($this->smtp_conn,"VRFY " . $name . $this->CRLF);
 1056+
 1057+ $rply = $this->get_lines();
 1058+ $code = substr($rply,0,3);
 1059+
 1060+ if($this->do_debug >= 2) {
 1061+ echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply;
 1062+ }
 1063+
 1064+ if($code != 250 && $code != 251) {
 1065+ $this->error =
 1066+ array("error" => "VRFY failed on name '$name'",
 1067+ "smtp_code" => $code,
 1068+ "smtp_msg" => substr($rply,4));
 1069+ if($this->do_debug >= 1) {
 1070+ echo "SMTP -> ERROR: " . $this->error["error"] .
 1071+ ": " . $rply . $this->CRLF;
 1072+ }
 1073+ return false;
 1074+ }
 1075+ return $rply;
 1076+ }
 1077+
 1078+ /*******************************************************************
 1079+ * INTERNAL FUNCTIONS *
 1080+ ******************************************************************/
 1081+
 1082+ /**
 1083+ * Read in as many lines as possible
 1084+ * either before eof or socket timeout occurs on the operation.
 1085+ * With SMTP we can tell if we have more lines to read if the
 1086+ * 4th character is '-' symbol. If it is a space then we don't
 1087+ * need to read anything else.
 1088+ * @access private
 1089+ * @return string
 1090+ */
 1091+ private function get_lines() {
 1092+ $data = "";
 1093+ while($str = @fgets($this->smtp_conn,515)) {
 1094+ if($this->do_debug >= 4) {
 1095+ echo "SMTP -> get_lines(): \$data was \"$data\"" .
 1096+ $this->CRLF;
 1097+ echo "SMTP -> get_lines(): \$str is \"$str\"" .
 1098+ $this->CRLF;
 1099+ }
 1100+ $data .= $str;
 1101+ if($this->do_debug >= 4) {
 1102+ echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF;
 1103+ }
 1104+ // if the 4th character is a space then we are done reading
 1105+ // so just break the loop
 1106+ if(substr($str,3,1) == " ") { break; }
 1107+ }
 1108+ return $data;
 1109+ }
 1110+
 1111+}
 1112+
 1113+
 1114+ ?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/class.smtp.php
___________________________________________________________________
Added: svn:eol-style
11115 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/codeworxtech.html
@@ -0,0 +1,121 @@
 2+<html>
 3+<head>
 4+<style>
 5+body, p {
 6+ font-family: Arial, Helvetica, sans-serif;
 7+ font-size: 12px;
 8+}
 9+div.width {
 10+ width: 500px;
 11+ text-align: left;
 12+}
 13+</style>
 14+<script>
 15+<!--
 16+var popsite="http://phpmailer.codeworxtech.com"
 17+var withfeatures="width=960,height=760,scrollbars=1,resizable=1,toolbar=1,location=1,menubar=1,status=1,directories=0"
 18+var once_per_session=0
 19+function get_cookie(Name) {
 20+ var search = Name + "="
 21+ var returnvalue = "";
 22+ if (document.cookie.length > 0) {
 23+ offset = document.cookie.indexOf(search)
 24+ if (offset != -1) { // if cookie exists
 25+ offset += search.length
 26+ // set index of beginning of value
 27+ end = document.cookie.indexOf(";", offset);
 28+ // set index of end of cookie value
 29+ if (end == -1)
 30+ end = document.cookie.length;
 31+ returnvalue=unescape(document.cookie.substring(offset, end))
 32+ }
 33+ }
 34+ return returnvalue;
 35+}
 36+function loadornot(){
 37+ if (get_cookie('popsite')=='') {
 38+ loadpopsite()
 39+ document.cookie="popsite=yes"
 40+ }
 41+}
 42+function loadpopsite(){
 43+ win2=window.open(popsite,"",withfeatures)
 44+ win2.blur()
 45+ window.focus()
 46+}
 47+if (once_per_session==0) {
 48+ loadpopsite()
 49+} else {
 50+ loadornot()
 51+}
 52+-->
 53+</script>
 54+</head>
 55+<body>
 56+<center>
 57+<div class="width">
 58+<hr>
 59+The http://phpmailer.codeworxtech.com/ website now carries a few
 60+advertisements through the Google Adsense network. Please visit
 61+the advertiser sites and help us offset some of our costs.<br />
 62+Thanks ....<br />
 63+<hr>
 64+<p><b>My name is Andy Prevost, AKA "codeworxtech".</b><br />
 65+<a href="http://www.codeworxtech.com">www.codeworxtech.com</a> for more information.<br />
 66+</p>
 67+<p><strong>WHY USE OUR TOOLS &amp; WHAT&#39;S IN IT FOR YOU?</strong></p>
 68+<p>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.</p>
 69+<p>Now, the introductions:</p>
 70+<p>Our company, <strong>Codeworx Technologies</strong>, 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, QuickCache, and QuickTabs) and now PHPMailer.
 71+We have staff and offices in the United States, Canada, Caribbean, the Middle
 72+East, and our primary development center in India. Our company is represented by
 73+agents and resellers globally.</p>
 74+<p><strong>Codeworx Technologies</strong> is at the forefront of developing PHP applications. Our staff are all Zend Certified university educated and experts at object oriented programming. While <strong>Codeworx Technologies</strong> 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&#39;re the team to get it done right at a reasonable price.</p>
 75+<p>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.</p>
 76+<p>Our developer tools are all Open Source. Here&#39;s a brief description:</p>
 77+<ul>
 78+ <li><span style="background-color: #FFFF00"><strong>PHPMailer</strong></span>. Originally authored by Brent Matzelle, PHPMailer is the leading "email transfer class" for PHP. PHPMailer is downloaded more than 18000 times each and every month by developers looking for a stable, simple email solution. We used it ourselves for years as our favorite tool. It&#39;s always been small (the entire footprint is around 100 Kb), stable, and as complete a solution as you can find. Other tools are nowhere near as simple. And more importantly, most of our applications (including PHPMailer) is implemented in a smaller footprint than one competing email class. Our thanks to Brent Matzelle for this superb tool - our commitment is to keep it lean, keep it focused, and compliant with standards. Visit the PHPMailer website at
 79+ <a href="http://phpmailer.codeworxtech.com/">http://phpmailer.codeworxtech.com/</a>. <br />
 80+ Please note: <strong>all of our focus is now on the PHPMailer for PHP5.</strong><br />
 81+ <span style="background-color: #FFFF00">PS. While you are at it, please visit our sponsor&#39;s sites, click on their ads.
 82+ It helps offset some of our costs.</span><br />
 83+ Want to help? We're looking for progressive developers to join our team of volunteer professionals working on PHPMailer. Our entire focus is on PHPMailer for PHP5, and our next major task is to enhance our
 84+ exception/error handling with PHP 5's object oriented try/throw/catch mechanisms. If you are interested, let us know.<br />
 85+ <br />
 86+ </li>
 87+ <li><strong><span style="background-color: #FFFF00">QuickCache</span></strong>. Originally authored by Jean Pierre Deckers as jpCache, QuickCache is an HTTP OpCode caching strategy that works on your entire site with only one line of code at the top of your script. The cached pages can be stored as files or as database objects. The benefits are absolutely astounding: bandwidth savings of up to 80% and screen display times increased by 8 - 10x. Visit the QuickCache website at
 88+ <a href="http://quickcache.codeworxtech.com/">http://quickcache.codeworxtech.com/</a>.<br />
 89+ <br />
 90+ </li>
 91+ <li><strong><span style="background-color: #FFFF00">QuickSkin</span></strong>. Originally authored by Philipp v. Criegern and named "SmartTemplate". The project was taken over by Manuel 'EndelWar' Dalla Lana and now by "codeworxtech". QuickSkin is one of the truly outstanding templating engines available, but has always been confused with Smarty Templating Engine. QuickSkin is even more relevant today than when it was launched. It&#39;s a small footprint with big impact on your projects. It features a built in caching technology, token based substitution, and works on the concept of one single HTML file as the template. The HTML template file can contain variable information making it one small powerful tool for your developer tool kit. Visit the QuickSkin website at
 92+ <a href="http://quickskin.codeworxtech.com/">http://quickskin.codeworxtech.com/</a>.<br />
 93+ <br />
 94+ </li>
 95+ <li><strong><span style="background-color: #FFFF00">QuickTabs</span></strong>. If you read about the projects above, you'll get the sense that we are minimalists and that's pretty accurate. We prefer using tools that are small, efficient, and effective. We have no use for software bloat. QuickTabs came to life in several of our projects where we needed to display complex information in a simplified manner to users. It had to function something like a "wizard" interface, but with more flexibility to float from one item to another. We looked at various Ajax-based solutions, but found one annoying problem with Ajax - page reloads if switching between items (with corresponding data loss if changed by the customer). QuickTabs is our solution to this by presenting complex data in a Javascript show/hide div set. It&#39;s not a complex architecture, but it works! Visit the QuickTabs website at <a href="http://quicktabs.codeworxtech.com/">http://quicktabs.codeworxtech.com/</a>.</li>
 96+</ul>
 97+<p>We're committed to PHP and to the Open Source community.</p>
 98+<p>Opportunities with <strong>Codeworx Technologies</strong>:</p>
 99+<ul>
 100+<li><span style="background-color: #FFFF00">Resellers/Agents</span>: We're always interested in talking with companies that
 101+want to represent
 102+<strong>Codeworx Technologies</strong> in their markets. We also have private label programs for our commercial products (in certain circumstances).</li>
 103+<li>Programmers/Developers: We are usually fully staffed, however, if you would like to be considered for a career with
 104+<strong>Codeworx Technologies</strong>, we would be pleased to hear from you.<br />
 105+A few things to note:<br />
 106+<ul>
 107+ <li>experience level does not matter: from fresh out of college to multi-year experience - it&#39;s your
 108+ creative mind and a positive attitude we want</li>
 109+ <li>if you contact us looking for employment, include a cover letter, indicate what type of work/career you are looking for and expected compensation</li>
 110+ <li>if you are representing someone else looking for work, do not contact us. We have an exclusive relationship with a recruiting partner already and not interested in altering the arrangement. We will not hire your candidate under any circumstances unless they wish to approach us individually.</li>
 111+ <li>any contact that ignores any of these points will be discarded</li>
 112+</ul></li>
 113+<li>Affiliates/Partnerships: We are interested in partnering with other firms who are leaders in their field. We clearly understand that successful companies are built on successful relationships in all industries world-wide. We currently have innovative relationships throughout the world that are mutually beneficial. Drop us a line and let&#39;s talk.</li>
 114+</ul>
 115+Regards,<br />
 116+Andy Prevost (aka, codeworxtech)<br />
 117+<a href="mailto:codeworxtech@users.sourceforge.net">codeworxtech@users.sourceforge.net</a><br />
 118+<br />
 119+</div>
 120+</center>
 121+</body>
 122+</html>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/codeworxtech.html
___________________________________________________________________
Added: svn:eol-style
1123 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/LICENSE
@@ -0,0 +1,504 @@
 2+ GNU LESSER GENERAL PUBLIC LICENSE
 3+ Version 2.1, February 1999
 4+
 5+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
 6+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 7+ Everyone is permitted to copy and distribute verbatim copies
 8+ of this license document, but changing it is not allowed.
 9+
 10+[This is the first released version of the Lesser GPL. It also counts
 11+ as the successor of the GNU Library Public License, version 2, hence
 12+ the version number 2.1.]
 13+
 14+ Preamble
 15+
 16+ The licenses for most software are designed to take away your
 17+freedom to share and change it. By contrast, the GNU General Public
 18+Licenses are intended to guarantee your freedom to share and change
 19+free software--to make sure the software is free for all its users.
 20+
 21+ This license, the Lesser General Public License, applies to some
 22+specially designated software packages--typically libraries--of the
 23+Free Software Foundation and other authors who decide to use it. You
 24+can use it too, but we suggest you first think carefully about whether
 25+this license or the ordinary General Public License is the better
 26+strategy to use in any particular case, based on the explanations below.
 27+
 28+ When we speak of free software, we are referring to freedom of use,
 29+not price. Our General Public Licenses are designed to make sure that
 30+you have the freedom to distribute copies of free software (and charge
 31+for this service if you wish); that you receive source code or can get
 32+it if you want it; that you can change the software and use pieces of
 33+it in new free programs; and that you are informed that you can do
 34+these things.
 35+
 36+ To protect your rights, we need to make restrictions that forbid
 37+distributors to deny you these rights or to ask you to surrender these
 38+rights. These restrictions translate to certain responsibilities for
 39+you if you distribute copies of the library or if you modify it.
 40+
 41+ For example, if you distribute copies of the library, whether gratis
 42+or for a fee, you must give the recipients all the rights that we gave
 43+you. You must make sure that they, too, receive or can get the source
 44+code. If you link other code with the library, you must provide
 45+complete object files to the recipients, so that they can relink them
 46+with the library after making changes to the library and recompiling
 47+it. And you must show them these terms so they know their rights.
 48+
 49+ We protect your rights with a two-step method: (1) we copyright the
 50+library, and (2) we offer you this license, which gives you legal
 51+permission to copy, distribute and/or modify the library.
 52+
 53+ To protect each distributor, we want to make it very clear that
 54+there is no warranty for the free library. Also, if the library is
 55+modified by someone else and passed on, the recipients should know
 56+that what they have is not the original version, so that the original
 57+author's reputation will not be affected by problems that might be
 58+introduced by others.
 59+
 60+ Finally, software patents pose a constant threat to the existence of
 61+any free program. We wish to make sure that a company cannot
 62+effectively restrict the users of a free program by obtaining a
 63+restrictive license from a patent holder. Therefore, we insist that
 64+any patent license obtained for a version of the library must be
 65+consistent with the full freedom of use specified in this license.
 66+
 67+ Most GNU software, including some libraries, is covered by the
 68+ordinary GNU General Public License. This license, the GNU Lesser
 69+General Public License, applies to certain designated libraries, and
 70+is quite different from the ordinary General Public License. We use
 71+this license for certain libraries in order to permit linking those
 72+libraries into non-free programs.
 73+
 74+ When a program is linked with a library, whether statically or using
 75+a shared library, the combination of the two is legally speaking a
 76+combined work, a derivative of the original library. The ordinary
 77+General Public License therefore permits such linking only if the
 78+entire combination fits its criteria of freedom. The Lesser General
 79+Public License permits more lax criteria for linking other code with
 80+the library.
 81+
 82+ We call this license the "Lesser" General Public License because it
 83+does Less to protect the user's freedom than the ordinary General
 84+Public License. It also provides other free software developers Less
 85+of an advantage over competing non-free programs. These disadvantages
 86+are the reason we use the ordinary General Public License for many
 87+libraries. However, the Lesser license provides advantages in certain
 88+special circumstances.
 89+
 90+ For example, on rare occasions, there may be a special need to
 91+encourage the widest possible use of a certain library, so that it becomes
 92+a de-facto standard. To achieve this, non-free programs must be
 93+allowed to use the library. A more frequent case is that a free
 94+library does the same job as widely used non-free libraries. In this
 95+case, there is little to gain by limiting the free library to free
 96+software only, so we use the Lesser General Public License.
 97+
 98+ In other cases, permission to use a particular library in non-free
 99+programs enables a greater number of people to use a large body of
 100+free software. For example, permission to use the GNU C Library in
 101+non-free programs enables many more people to use the whole GNU
 102+operating system, as well as its variant, the GNU/Linux operating
 103+system.
 104+
 105+ Although the Lesser General Public License is Less protective of the
 106+users' freedom, it does ensure that the user of a program that is
 107+linked with the Library has the freedom and the wherewithal to run
 108+that program using a modified version of the Library.
 109+
 110+ The precise terms and conditions for copying, distribution and
 111+modification follow. Pay close attention to the difference between a
 112+"work based on the library" and a "work that uses the library". The
 113+former contains code derived from the library, whereas the latter must
 114+be combined with the library in order to run.
 115+
 116+ GNU LESSER GENERAL PUBLIC LICENSE
 117+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 118+
 119+ 0. This License Agreement applies to any software library or other
 120+program which contains a notice placed by the copyright holder or
 121+other authorized party saying it may be distributed under the terms of
 122+this Lesser General Public License (also called "this License").
 123+Each licensee is addressed as "you".
 124+
 125+ A "library" means a collection of software functions and/or data
 126+prepared so as to be conveniently linked with application programs
 127+(which use some of those functions and data) to form executables.
 128+
 129+ The "Library", below, refers to any such software library or work
 130+which has been distributed under these terms. A "work based on the
 131+Library" means either the Library or any derivative work under
 132+copyright law: that is to say, a work containing the Library or a
 133+portion of it, either verbatim or with modifications and/or translated
 134+straightforwardly into another language. (Hereinafter, translation is
 135+included without limitation in the term "modification".)
 136+
 137+ "Source code" for a work means the preferred form of the work for
 138+making modifications to it. For a library, complete source code means
 139+all the source code for all modules it contains, plus any associated
 140+interface definition files, plus the scripts used to control compilation
 141+and installation of the library.
 142+
 143+ Activities other than copying, distribution and modification are not
 144+covered by this License; they are outside its scope. The act of
 145+running a program using the Library is not restricted, and output from
 146+such a program is covered only if its contents constitute a work based
 147+on the Library (independent of the use of the Library in a tool for
 148+writing it). Whether that is true depends on what the Library does
 149+and what the program that uses the Library does.
 150+
 151+ 1. You may copy and distribute verbatim copies of the Library's
 152+complete source code as you receive it, in any medium, provided that
 153+you conspicuously and appropriately publish on each copy an
 154+appropriate copyright notice and disclaimer of warranty; keep intact
 155+all the notices that refer to this License and to the absence of any
 156+warranty; and distribute a copy of this License along with the
 157+Library.
 158+
 159+ You may charge a fee for the physical act of transferring a copy,
 160+and you may at your option offer warranty protection in exchange for a
 161+fee.
 162+
 163+ 2. You may modify your copy or copies of the Library or any portion
 164+of it, thus forming a work based on the Library, and copy and
 165+distribute such modifications or work under the terms of Section 1
 166+above, provided that you also meet all of these conditions:
 167+
 168+ a) The modified work must itself be a software library.
 169+
 170+ b) You must cause the files modified to carry prominent notices
 171+ stating that you changed the files and the date of any change.
 172+
 173+ c) You must cause the whole of the work to be licensed at no
 174+ charge to all third parties under the terms of this License.
 175+
 176+ d) If a facility in the modified Library refers to a function or a
 177+ table of data to be supplied by an application program that uses
 178+ the facility, other than as an argument passed when the facility
 179+ is invoked, then you must make a good faith effort to ensure that,
 180+ in the event an application does not supply such function or
 181+ table, the facility still operates, and performs whatever part of
 182+ its purpose remains meaningful.
 183+
 184+ (For example, a function in a library to compute square roots has
 185+ a purpose that is entirely well-defined independent of the
 186+ application. Therefore, Subsection 2d requires that any
 187+ application-supplied function or table used by this function must
 188+ be optional: if the application does not supply it, the square
 189+ root function must still compute square roots.)
 190+
 191+These requirements apply to the modified work as a whole. If
 192+identifiable sections of that work are not derived from the Library,
 193+and can be reasonably considered independent and separate works in
 194+themselves, then this License, and its terms, do not apply to those
 195+sections when you distribute them as separate works. But when you
 196+distribute the same sections as part of a whole which is a work based
 197+on the Library, the distribution of the whole must be on the terms of
 198+this License, whose permissions for other licensees extend to the
 199+entire whole, and thus to each and every part regardless of who wrote
 200+it.
 201+
 202+Thus, it is not the intent of this section to claim rights or contest
 203+your rights to work written entirely by you; rather, the intent is to
 204+exercise the right to control the distribution of derivative or
 205+collective works based on the Library.
 206+
 207+In addition, mere aggregation of another work not based on the Library
 208+with the Library (or with a work based on the Library) on a volume of
 209+a storage or distribution medium does not bring the other work under
 210+the scope of this License.
 211+
 212+ 3. You may opt to apply the terms of the ordinary GNU General Public
 213+License instead of this License to a given copy of the Library. To do
 214+this, you must alter all the notices that refer to this License, so
 215+that they refer to the ordinary GNU General Public License, version 2,
 216+instead of to this License. (If a newer version than version 2 of the
 217+ordinary GNU General Public License has appeared, then you can specify
 218+that version instead if you wish.) Do not make any other change in
 219+these notices.
 220+
 221+ Once this change is made in a given copy, it is irreversible for
 222+that copy, so the ordinary GNU General Public License applies to all
 223+subsequent copies and derivative works made from that copy.
 224+
 225+ This option is useful when you wish to copy part of the code of
 226+the Library into a program that is not a library.
 227+
 228+ 4. You may copy and distribute the Library (or a portion or
 229+derivative of it, under Section 2) in object code or executable form
 230+under the terms of Sections 1 and 2 above provided that you accompany
 231+it with the complete corresponding machine-readable source code, which
 232+must be distributed under the terms of Sections 1 and 2 above on a
 233+medium customarily used for software interchange.
 234+
 235+ If distribution of object code is made by offering access to copy
 236+from a designated place, then offering equivalent access to copy the
 237+source code from the same place satisfies the requirement to
 238+distribute the source code, even though third parties are not
 239+compelled to copy the source along with the object code.
 240+
 241+ 5. A program that contains no derivative of any portion of the
 242+Library, but is designed to work with the Library by being compiled or
 243+linked with it, is called a "work that uses the Library". Such a
 244+work, in isolation, is not a derivative work of the Library, and
 245+therefore falls outside the scope of this License.
 246+
 247+ However, linking a "work that uses the Library" with the Library
 248+creates an executable that is a derivative of the Library (because it
 249+contains portions of the Library), rather than a "work that uses the
 250+library". The executable is therefore covered by this License.
 251+Section 6 states terms for distribution of such executables.
 252+
 253+ When a "work that uses the Library" uses material from a header file
 254+that is part of the Library, the object code for the work may be a
 255+derivative work of the Library even though the source code is not.
 256+Whether this is true is especially significant if the work can be
 257+linked without the Library, or if the work is itself a library. The
 258+threshold for this to be true is not precisely defined by law.
 259+
 260+ If such an object file uses only numerical parameters, data
 261+structure layouts and accessors, and small macros and small inline
 262+functions (ten lines or less in length), then the use of the object
 263+file is unrestricted, regardless of whether it is legally a derivative
 264+work. (Executables containing this object code plus portions of the
 265+Library will still fall under Section 6.)
 266+
 267+ Otherwise, if the work is a derivative of the Library, you may
 268+distribute the object code for the work under the terms of Section 6.
 269+Any executables containing that work also fall under Section 6,
 270+whether or not they are linked directly with the Library itself.
 271+
 272+ 6. As an exception to the Sections above, you may also combine or
 273+link a "work that uses the Library" with the Library to produce a
 274+work containing portions of the Library, and distribute that work
 275+under terms of your choice, provided that the terms permit
 276+modification of the work for the customer's own use and reverse
 277+engineering for debugging such modifications.
 278+
 279+ You must give prominent notice with each copy of the work that the
 280+Library is used in it and that the Library and its use are covered by
 281+this License. You must supply a copy of this License. If the work
 282+during execution displays copyright notices, you must include the
 283+copyright notice for the Library among them, as well as a reference
 284+directing the user to the copy of this License. Also, you must do one
 285+of these things:
 286+
 287+ a) Accompany the work with the complete corresponding
 288+ machine-readable source code for the Library including whatever
 289+ changes were used in the work (which must be distributed under
 290+ Sections 1 and 2 above); and, if the work is an executable linked
 291+ with the Library, with the complete machine-readable "work that
 292+ uses the Library", as object code and/or source code, so that the
 293+ user can modify the Library and then relink to produce a modified
 294+ executable containing the modified Library. (It is understood
 295+ that the user who changes the contents of definitions files in the
 296+ Library will not necessarily be able to recompile the application
 297+ to use the modified definitions.)
 298+
 299+ b) Use a suitable shared library mechanism for linking with the
 300+ Library. A suitable mechanism is one that (1) uses at run time a
 301+ copy of the library already present on the user's computer system,
 302+ rather than copying library functions into the executable, and (2)
 303+ will operate properly with a modified version of the library, if
 304+ the user installs one, as long as the modified version is
 305+ interface-compatible with the version that the work was made with.
 306+
 307+ c) Accompany the work with a written offer, valid for at
 308+ least three years, to give the same user the materials
 309+ specified in Subsection 6a, above, for a charge no more
 310+ than the cost of performing this distribution.
 311+
 312+ d) If distribution of the work is made by offering access to copy
 313+ from a designated place, offer equivalent access to copy the above
 314+ specified materials from the same place.
 315+
 316+ e) Verify that the user has already received a copy of these
 317+ materials or that you have already sent this user a copy.
 318+
 319+ For an executable, the required form of the "work that uses the
 320+Library" must include any data and utility programs needed for
 321+reproducing the executable from it. However, as a special exception,
 322+the materials to be distributed need not include anything that is
 323+normally distributed (in either source or binary form) with the major
 324+components (compiler, kernel, and so on) of the operating system on
 325+which the executable runs, unless that component itself accompanies
 326+the executable.
 327+
 328+ It may happen that this requirement contradicts the license
 329+restrictions of other proprietary libraries that do not normally
 330+accompany the operating system. Such a contradiction means you cannot
 331+use both them and the Library together in an executable that you
 332+distribute.
 333+
 334+ 7. You may place library facilities that are a work based on the
 335+Library side-by-side in a single library together with other library
 336+facilities not covered by this License, and distribute such a combined
 337+library, provided that the separate distribution of the work based on
 338+the Library and of the other library facilities is otherwise
 339+permitted, and provided that you do these two things:
 340+
 341+ a) Accompany the combined library with a copy of the same work
 342+ based on the Library, uncombined with any other library
 343+ facilities. This must be distributed under the terms of the
 344+ Sections above.
 345+
 346+ b) Give prominent notice with the combined library of the fact
 347+ that part of it is a work based on the Library, and explaining
 348+ where to find the accompanying uncombined form of the same work.
 349+
 350+ 8. You may not copy, modify, sublicense, link with, or distribute
 351+the Library except as expressly provided under this License. Any
 352+attempt otherwise to copy, modify, sublicense, link with, or
 353+distribute the Library is void, and will automatically terminate your
 354+rights under this License. However, parties who have received copies,
 355+or rights, from you under this License will not have their licenses
 356+terminated so long as such parties remain in full compliance.
 357+
 358+ 9. You are not required to accept this License, since you have not
 359+signed it. However, nothing else grants you permission to modify or
 360+distribute the Library or its derivative works. These actions are
 361+prohibited by law if you do not accept this License. Therefore, by
 362+modifying or distributing the Library (or any work based on the
 363+Library), you indicate your acceptance of this License to do so, and
 364+all its terms and conditions for copying, distributing or modifying
 365+the Library or works based on it.
 366+
 367+ 10. Each time you redistribute the Library (or any work based on the
 368+Library), the recipient automatically receives a license from the
 369+original licensor to copy, distribute, link with or modify the Library
 370+subject to these terms and conditions. You may not impose any further
 371+restrictions on the recipients' exercise of the rights granted herein.
 372+You are not responsible for enforcing compliance by third parties with
 373+this License.
 374+
 375+ 11. If, as a consequence of a court judgment or allegation of patent
 376+infringement or for any other reason (not limited to patent issues),
 377+conditions are imposed on you (whether by court order, agreement or
 378+otherwise) that contradict the conditions of this License, they do not
 379+excuse you from the conditions of this License. If you cannot
 380+distribute so as to satisfy simultaneously your obligations under this
 381+License and any other pertinent obligations, then as a consequence you
 382+may not distribute the Library at all. For example, if a patent
 383+license would not permit royalty-free redistribution of the Library by
 384+all those who receive copies directly or indirectly through you, then
 385+the only way you could satisfy both it and this License would be to
 386+refrain entirely from distribution of the Library.
 387+
 388+If any portion of this section is held invalid or unenforceable under any
 389+particular circumstance, the balance of the section is intended to apply,
 390+and the section as a whole is intended to apply in other circumstances.
 391+
 392+It is not the purpose of this section to induce you to infringe any
 393+patents or other property right claims or to contest validity of any
 394+such claims; this section has the sole purpose of protecting the
 395+integrity of the free software distribution system which is
 396+implemented by public license practices. Many people have made
 397+generous contributions to the wide range of software distributed
 398+through that system in reliance on consistent application of that
 399+system; it is up to the author/donor to decide if he or she is willing
 400+to distribute software through any other system and a licensee cannot
 401+impose that choice.
 402+
 403+This section is intended to make thoroughly clear what is believed to
 404+be a consequence of the rest of this License.
 405+
 406+ 12. If the distribution and/or use of the Library is restricted in
 407+certain countries either by patents or by copyrighted interfaces, the
 408+original copyright holder who places the Library under this License may add
 409+an explicit geographical distribution limitation excluding those countries,
 410+so that distribution is permitted only in or among countries not thus
 411+excluded. In such case, this License incorporates the limitation as if
 412+written in the body of this License.
 413+
 414+ 13. The Free Software Foundation may publish revised and/or new
 415+versions of the Lesser General Public License from time to time.
 416+Such new versions will be similar in spirit to the present version,
 417+but may differ in detail to address new problems or concerns.
 418+
 419+Each version is given a distinguishing version number. If the Library
 420+specifies a version number of this License which applies to it and
 421+"any later version", you have the option of following the terms and
 422+conditions either of that version or of any later version published by
 423+the Free Software Foundation. If the Library does not specify a
 424+license version number, you may choose any version ever published by
 425+the Free Software Foundation.
 426+
 427+ 14. If you wish to incorporate parts of the Library into other free
 428+programs whose distribution conditions are incompatible with these,
 429+write to the author to ask for permission. For software which is
 430+copyrighted by the Free Software Foundation, write to the Free
 431+Software Foundation; we sometimes make exceptions for this. Our
 432+decision will be guided by the two goals of preserving the free status
 433+of all derivatives of our free software and of promoting the sharing
 434+and reuse of software generally.
 435+
 436+ NO WARRANTY
 437+
 438+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
 439+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
 440+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
 441+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
 442+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
 443+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 444+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
 445+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
 446+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
 447+
 448+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
 449+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
 450+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
 451+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
 452+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
 453+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
 454+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
 455+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
 456+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 457+DAMAGES.
 458+
 459+ END OF TERMS AND CONDITIONS
 460+
 461+ How to Apply These Terms to Your New Libraries
 462+
 463+ If you develop a new library, and you want it to be of the greatest
 464+possible use to the public, we recommend making it free software that
 465+everyone can redistribute and change. You can do so by permitting
 466+redistribution under these terms (or, alternatively, under the terms of the
 467+ordinary General Public License).
 468+
 469+ To apply these terms, attach the following notices to the library. It is
 470+safest to attach them to the start of each source file to most effectively
 471+convey the exclusion of warranty; and each file should have at least the
 472+"copyright" line and a pointer to where the full notice is found.
 473+
 474+ <one line to give the library's name and a brief idea of what it does.>
 475+ Copyright (C) <year> <name of author>
 476+
 477+ This library is free software; you can redistribute it and/or
 478+ modify it under the terms of the GNU Lesser General Public
 479+ License as published by the Free Software Foundation; either
 480+ version 2.1 of the License, or (at your option) any later version.
 481+
 482+ This library is distributed in the hope that it will be useful,
 483+ but WITHOUT ANY WARRANTY; without even the implied warranty of
 484+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 485+ Lesser General Public License for more details.
 486+
 487+ You should have received a copy of the GNU Lesser General Public
 488+ License along with this library; if not, write to the Free Software
 489+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 490+
 491+Also add information on how to contact you by electronic and paper mail.
 492+
 493+You should also get your employer (if you work as a programmer) or your
 494+school, if any, to sign a "copyright disclaimer" for the library, if
 495+necessary. Here is a sample; alter the names:
 496+
 497+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
 498+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
 499+
 500+ <signature of Ty Coon>, 1 April 1990
 501+ Ty Coon, President of Vice
 502+
 503+That's all there is to it!
 504+
 505+
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/LICENSE
___________________________________________________________________
Added: svn:eol-style
1506 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-ro.php
@@ -0,0 +1,25 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Romanian Version
 6+ * @package PHPMailer
 7+ * @author Catalin Constantin <catalin@dazoot.ro>
 8+ */
 9+
 10+$PHPMAILER_LANG = array();
 11+
 12+$PHPMAILER_LANG["provide_address"] = 'Trebuie sa adaugati cel putin un recipient (adresa de mail).';
 13+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer nu este suportat.';
 14+$PHPMAILER_LANG["execute"] = 'Nu pot executa: ';
 15+$PHPMAILER_LANG["instantiate"] = 'Nu am putut instantia functia mail.';
 16+$PHPMAILER_LANG["authenticate"] = 'Eroare SMTP: Nu a functionat autentificarea.';
 17+$PHPMAILER_LANG["from_failed"] = 'Urmatoarele adrese From au dat eroare: ';
 18+$PHPMAILER_LANG["recipients_failed"] = 'Eroare SMTP: Urmatoarele adrese de mail au dat eroare: ';
 19+$PHPMAILER_LANG["data_not_accepted"] = 'Eroare SMTP: Continutul mailului nu a fost acceptat.';
 20+$PHPMAILER_LANG["connect_host"] = 'Eroare SMTP: Nu m-am putut conecta la adresa SMTP.';
 21+$PHPMAILER_LANG["file_access"] = 'Nu pot accesa fisierul: ';
 22+$PHPMAILER_LANG["file_open"] = 'Eroare de fisier: Nu pot deschide fisierul: ';
 23+$PHPMAILER_LANG["encoding"] = 'Encodare necunoscuta: ';
 24+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 25+
 26+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-ro.php
___________________________________________________________________
Added: svn:keywords
127 + Id
Added: svn:eol-style
228 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-ca.php
@@ -0,0 +1,24 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Catalan Version
 6+ * By Ivan: web AT microstudi DOT com
 7+ */
 8+
 9+$PHPMAILER_LANG = array();
 10+
 11+$PHPMAILER_LANG["provide_address"] = 'S\'ha de proveir almenys una adreça d\'email com a destinatari.';
 12+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer no està suportat';
 13+$PHPMAILER_LANG["execute"] = 'No es pot executar: ';
 14+$PHPMAILER_LANG["instantiate"] = 'No s\'ha pogut crear una instància de la funció Mail.';
 15+$PHPMAILER_LANG["authenticate"] = 'Error SMTP: No s\'hapogut autenticar.';
 16+$PHPMAILER_LANG["from_failed"] = 'La(s) següent(s) adreces de remitent han fallat: ';
 17+$PHPMAILER_LANG["recipients_failed"] = 'Error SMTP: Els següents destinataris han fallat: ';
 18+$PHPMAILER_LANG["data_not_accepted"] = 'Error SMTP: Dades no acceptades.';
 19+$PHPMAILER_LANG["connect_host"] = 'Error SMTP: No es pot connectar al servidor SMTP.';
 20+$PHPMAILER_LANG["file_access"] = 'No es pot accedir a l\'arxiu: ';
 21+$PHPMAILER_LANG["file_open"] = 'Error d\'Arxiu: No es pot obrir l\'arxiu: ';
 22+$PHPMAILER_LANG["encoding"] = 'Codificació desconeguda: ';
 23+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 24+
 25+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-ca.php
___________________________________________________________________
Added: svn:eol-style
126 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-tr.php
@@ -0,0 +1,26 @@
 2+<?php
 3+/**
 4+ * PHPMailer dil dosyas�.
 5+ * T�rk�e Versiyonu
 6+ * �ZYAZILIM - El�in �zel - Can Y�lmaz - Mehmet Benlio�lu
 7+ */
 8+
 9+$PHPMAILER_LANG = array();
 10+
 11+$PHPMAILER_LANG["provide_address"] = 'En az bir tane mail adresi belirtmek zorundas�n�z ' .
 12+ 'al�c�n�n email adresi.';
 13+$PHPMAILER_LANG["mailer_not_supported"] = ' mailler desteklenmemektedir.';
 14+$PHPMAILER_LANG["execute"] = '�al��t�r�lam�yor: ';
 15+$PHPMAILER_LANG["instantiate"] = '�rnek mail fonksiyonu yarat�lamad�.';
 16+$PHPMAILER_LANG["authenticate"] = 'SMTP Hatas�: Do�rulanam�yor.';
 17+$PHPMAILER_LANG["from_failed"] = 'Ba�ar�s�z olan g�nderici adresi: ';
 18+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Hatas�: ' .
 19+ 'al�c�lara ula�mad�: ';
 20+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Hatas�: Veri kabul edilmedi.';
 21+$PHPMAILER_LANG["connect_host"] = 'SMTP Hatas�: SMTP hosta ba�lan�lam�yor.';
 22+$PHPMAILER_LANG["file_access"] = 'Dosyaya eri�ilemiyor: ';
 23+$PHPMAILER_LANG["file_open"] = 'Dosya Hatas�: Dosya a��lam�yor: ';
 24+$PHPMAILER_LANG["encoding"] = 'Bilinmeyen �ifreleme: ';
 25+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 26+
 27+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-tr.php
___________________________________________________________________
Added: svn:eol-style
128 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-ru.php
@@ -0,0 +1,26 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Russian Version by Alexey Chumakov <alex@chumakov.ru>
 6+ */
 7+
 8+$PHPMAILER_LANG = array();
 9+
 10+$PHPMAILER_LANG["provide_address"] = '����������, ������� ���� �� ���� ����� e-mail ' .
 11+ '����������.';
 12+$PHPMAILER_LANG["mailer_not_supported"] = ' - �������� ������ �� ��������������.';
 13+$PHPMAILER_LANG["execute"] = '���������� ��������� �������: ';
 14+$PHPMAILER_LANG["instantiate"] = '���������� ��������� ������� mail.';
 15+$PHPMAILER_LANG["authenticate"] = '������ SMTP: ������ �����������.';
 16+$PHPMAILER_LANG["from_failed"] = '�������� ����� �����������: ';
 17+$PHPMAILER_LANG["recipients_failed"] = '������ SMTP: �������� �� ��������� ' .
 18+ '������� ����������� �� �������: ';
 19+$PHPMAILER_LANG["data_not_accepted"] = '������ SMTP: ������ �� �������.';
 20+$PHPMAILER_LANG["connect_host"] = '������ SMTP: �� ������� ������������ � ������� SMTP.';
 21+$PHPMAILER_LANG["file_access"] = '��� ������� � �����: ';
 22+$PHPMAILER_LANG["file_open"] = '�������� ������: �� ������� ������� ����: ';
 23+$PHPMAILER_LANG["encoding"] = '����������� ��� ���������: ';
 24+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 25+
 26+?>
 27+
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-ru.php
___________________________________________________________________
Added: svn:keywords
128 + Id
Added: svn:eol-style
229 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-de.php
@@ -0,0 +1,26 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * German Version
 6+ */
 7+
 8+$PHPMAILER_LANG = array();
 9+
 10+$PHPMAILER_LANG["provide_address"] = 'Bitte geben Sie mindestens eine ' .
 11+ 'Empf&auml;nger Emailadresse an.';
 12+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer wird nicht unterst&uuml;tzt.';
 13+$PHPMAILER_LANG["execute"] = 'Konnte folgenden Befehl nicht ausf&uuml;hren: ';
 14+$PHPMAILER_LANG["instantiate"] = 'Mail Funktion konnte nicht initialisiert werden.';
 15+$PHPMAILER_LANG["authenticate"] = 'SMTP Fehler: Authentifizierung fehlgeschlagen.';
 16+$PHPMAILER_LANG["from_failed"] = 'Die folgende Absenderadresse ist nicht korrekt: ';
 17+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Fehler: Die folgenden ' .
 18+ 'Empf&auml;nger sind nicht korrekt: ';
 19+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Fehler: Daten werden nicht akzeptiert.';
 20+$PHPMAILER_LANG["connect_host"] = 'SMTP Fehler: Konnte keine Verbindung zum SMTP-Host herstellen.';
 21+$PHPMAILER_LANG["file_access"] = 'Zugriff auf folgende Datei fehlgeschlagen: ';
 22+$PHPMAILER_LANG["file_open"] = 'Datei Fehler: konnte folgende Datei nicht &ouml;ffnen: ';
 23+$PHPMAILER_LANG["encoding"] = 'Unbekanntes Encoding-Format: ';
 24+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 25+
 26+?>
 27+
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-de.php
___________________________________________________________________
Added: svn:eol-style
128 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-ja.php
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-ja.php
___________________________________________________________________
Added: svn:mime-type
229 + application/octet-stream
Added: svn:keywords
330 + Id
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-fi.php
@@ -0,0 +1,25 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Finnish Version
 6+ * By Jyry Kuukanen
 7+ */
 8+
 9+$PHPMAILER_LANG = array();
 10+
 11+$PHPMAILER_LANG["provide_address"] = 'Aseta v&auml;hint&auml;&auml;n yksi vastaanottajan ' .
 12+ 's&auml;hk&ouml;postiosoite.';
 13+$PHPMAILER_LANG["mailer_not_supported"] = 'postiv&auml;litintyyppi&auml; ei tueta.';
 14+$PHPMAILER_LANG["execute"] = 'Suoritus ep&auml;onnistui: ';
 15+$PHPMAILER_LANG["instantiate"] = 'mail-funktion luonti ep&auml;onnistui.';
 16+$PHPMAILER_LANG["authenticate"] = 'SMTP-virhe: k&auml;ytt&auml;j&auml;tunnistus ep&auml;onnistui.';
 17+$PHPMAILER_LANG["from_failed"] = 'Seuraava l&auml;hett&auml;j&auml;n osoite on virheellinen: ';
 18+$PHPMAILER_LANG["recipients_failed"] = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.';
 19+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP-virhe: data on virheellinen.';
 20+$PHPMAILER_LANG["connect_host"] = 'SMTP-virhe: yhteys palvelimeen ei onnistu.';
 21+$PHPMAILER_LANG["file_access"] = 'Seuraavaan tiedostoon ei ole oikeuksia: ';
 22+$PHPMAILER_LANG["file_open"] = 'Tiedostovirhe: Ei voida avata tiedostoa: ';
 23+$PHPMAILER_LANG["encoding"] = 'Tuntematon koodaustyyppi: ';
 24+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 25+
 26+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-fi.php
___________________________________________________________________
Added: svn:keywords
127 + Id
Added: svn:eol-style
228 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-dk.php
@@ -0,0 +1,26 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Danish Version
 6+ * Author: Mikael Stokkebro <info@stokkebro.dk>
 7+ */
 8+
 9+$PHPMAILER_LANG = array();
 10+
 11+$PHPMAILER_LANG["provide_address"] = 'Du skal indtaste mindst en ' .
 12+ 'modtagers emailadresse.';
 13+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer understøttes ikke.';
 14+$PHPMAILER_LANG["execute"] = 'Kunne ikke køre: ';
 15+$PHPMAILER_LANG["instantiate"] = 'Kunne ikke initialisere email funktionen.';
 16+$PHPMAILER_LANG["authenticate"] = 'SMTP fejl: Kunne ikke logge på.';
 17+$PHPMAILER_LANG["from_failed"] = 'Følgende afsenderadresse er forkert: ';
 18+$PHPMAILER_LANG["recipients_failed"] = 'SMTP fejl: Følgende' .
 19+ 'modtagere er forkerte: ';
 20+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP fejl: Data kunne ikke accepteres.';
 21+$PHPMAILER_LANG["connect_host"] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.';
 22+$PHPMAILER_LANG["file_access"] = 'Ingen adgang til fil: ';
 23+$PHPMAILER_LANG["file_open"] = 'Fil fejl: Kunne ikke åbne filen: ';
 24+$PHPMAILER_LANG["encoding"] = 'Ukendt encode-format: ';
 25+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 26+
 27+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-dk.php
___________________________________________________________________
Added: svn:eol-style
128 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-en.php
@@ -0,0 +1,25 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * English Version
 6+ */
 7+
 8+$PHPMAILER_LANG = array();
 9+
 10+$PHPMAILER_LANG["provide_address"] = 'You must provide at least one ' .
 11+ 'recipient email address.';
 12+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer is not supported.';
 13+$PHPMAILER_LANG["execute"] = 'Could not execute: ';
 14+$PHPMAILER_LANG["instantiate"] = 'Could not instantiate mail function.';
 15+$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Could not authenticate.';
 16+$PHPMAILER_LANG["from_failed"] = 'The following From address failed: ';
 17+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: The following ' .
 18+ 'recipients failed: ';
 19+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data not accepted.';
 20+$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Could not connect to SMTP host.';
 21+$PHPMAILER_LANG["file_access"] = 'Could not access file: ';
 22+$PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: ';
 23+$PHPMAILER_LANG["encoding"] = 'Unknown encoding: ';
 24+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 25+
 26+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-en.php
___________________________________________________________________
Added: svn:eol-style
127 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-br.php
@@ -0,0 +1,24 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Portuguese Version
 6+ * By Paulo Henrique Garcia - paulo@controllerweb.com.br
 7+ */
 8+
 9+$PHPMAILER_LANG = array();
 10+$PHPMAILER_LANG["provide_address"] = 'Você deve fornecer pelo menos um endereço de destinatário de email.';
 11+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer não suportado.';
 12+$PHPMAILER_LANG["execute"] = 'Não foi possível executar: ';
 13+$PHPMAILER_LANG["instantiate"] = 'Não foi possível instanciar a função mail.';
 14+$PHPMAILER_LANG["authenticate"] = 'Erro de SMTP: Não foi possível autenticar.';
 15+$PHPMAILER_LANG["from_failed"] = 'Os endereços de rementente a seguir falharam: ';
 16+$PHPMAILER_LANG["recipients_failed"] = 'Erro de SMTP: Os endereços de destinatário a seguir falharam: ';
 17+$PHPMAILER_LANG["data_not_accepted"] = 'Erro de SMTP: Dados não aceitos.';
 18+$PHPMAILER_LANG["connect_host"] = 'Erro de SMTP: Não foi possível conectar com o servidor SMTP.';
 19+$PHPMAILER_LANG["file_access"] = 'Não foi possível acessar o arquivo: ';
 20+$PHPMAILER_LANG["file_open"] = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';
 21+$PHPMAILER_LANG["encoding"] = 'Codificação desconhecida: ';
 22+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 23+
 24+?>
 25+
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-br.php
___________________________________________________________________
Added: svn:keywords
126 + Id
Added: svn:eol-style
227 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-fo.php
@@ -0,0 +1,27 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Faroese Version [language of the Faroe Islands, a Danish dominion]
 6+ * This file created: 11-06-2004
 7+ * Supplied by Dávur Sørensen [www.profo-webdesign.dk]
 8+ */
 9+
 10+$PHPMAILER_LANG = array();
 11+
 12+$PHPMAILER_LANG["provide_address"] = 'Tú skal uppgeva minst ' .
 13+ 'móttakara-emailadressu(r).';
 14+$PHPMAILER_LANG["mailer_not_supported"] = ' er ikki supporterað.';
 15+$PHPMAILER_LANG["execute"] = 'Kundi ikki útføra: ';
 16+$PHPMAILER_LANG["instantiate"] = 'Kuni ikki instantiera mail funktión.';
 17+$PHPMAILER_LANG["authenticate"] = 'SMTP feilur: Kundi ikki góðkenna.';
 18+$PHPMAILER_LANG["from_failed"] = 'fylgjandi Frá/From adressa miseydnaðist: ';
 19+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Feilur: Fylgjandi ' .
 20+ 'móttakarar miseydnaðust: ';
 21+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP feilur: Data ikki góðkent.';
 22+$PHPMAILER_LANG["connect_host"] = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.';
 23+$PHPMAILER_LANG["file_access"] = 'Kundi ikki tilganga fílu: ';
 24+$PHPMAILER_LANG["file_open"] = 'Fílu feilur: Kundi ikki opna fílu: ';
 25+$PHPMAILER_LANG["encoding"] = 'Ókend encoding: ';
 26+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 27+
 28+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-fo.php
___________________________________________________________________
Added: svn:eol-style
129 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-se.php
@@ -0,0 +1,26 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Swedish Version
 6+ * Author: Johan Linn�r <johan@linner.biz>
 7+ */
 8+
 9+$PHPMAILER_LANG = array();
 10+
 11+$PHPMAILER_LANG["provide_address"] = 'Du m�ste ange minst en ' .
 12+ 'mottagares e-postadress.';
 13+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer st�ds inte.';
 14+$PHPMAILER_LANG["execute"] = 'Kunde inte k�ra: ';
 15+$PHPMAILER_LANG["instantiate"] = 'Kunde inte initiera e-postfunktion.';
 16+$PHPMAILER_LANG["authenticate"] = 'SMTP fel: Kunde inte autentisera.';
 17+$PHPMAILER_LANG["from_failed"] = 'F�ljande avs�ndaradress �r felaktig: ';
 18+$PHPMAILER_LANG["recipients_failed"] = 'SMTP fel: F�ljande ' .
 19+ 'mottagare �r felaktig: ';
 20+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP fel: Data accepterades inte.';
 21+$PHPMAILER_LANG["connect_host"] = 'SMTP fel: Kunde inte ansluta till SMTP-server.';
 22+$PHPMAILER_LANG["file_access"] = 'Ingen �tkomst till fil: ';
 23+$PHPMAILER_LANG["file_open"] = 'Fil fel: Kunde inte �ppna fil: ';
 24+$PHPMAILER_LANG["encoding"] = 'Ok�nt encode-format: ';
 25+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 26+
 27+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-se.php
___________________________________________________________________
Added: svn:keywords
128 + Id
Added: svn:eol-style
229 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-es.php
@@ -0,0 +1,25 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Versi�n en espa�ol
 6+ */
 7+
 8+$PHPMAILER_LANG = array();
 9+
 10+$PHPMAILER_LANG["provide_address"] = 'Debe proveer al menos una ' .
 11+ 'direcci�n de email como destinatario.';
 12+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer no est� soportado.';
 13+$PHPMAILER_LANG["execute"] = 'No puedo ejecutar: ';
 14+$PHPMAILER_LANG["instantiate"] = 'No pude crear una instancia de la funci�n Mail.';
 15+$PHPMAILER_LANG["authenticate"] = 'Error SMTP: No se pudo autentificar.';
 16+$PHPMAILER_LANG["from_failed"] = 'La(s) siguiente(s) direcciones de remitente fallaron: ';
 17+$PHPMAILER_LANG["recipients_failed"] = 'Error SMTP: Los siguientes ' .
 18+ 'destinatarios fallaron: ';
 19+$PHPMAILER_LANG["data_not_accepted"] = 'Error SMTP: Datos no aceptados.';
 20+$PHPMAILER_LANG["connect_host"] = 'Error SMTP: No puedo conectar al servidor SMTP.';
 21+$PHPMAILER_LANG["file_access"] = 'No puedo acceder al archivo: ';
 22+$PHPMAILER_LANG["file_open"] = 'Error de Archivo: No puede abrir el archivo: ';
 23+$PHPMAILER_LANG["encoding"] = 'Codificaci�n desconocida: ';
 24+$PHPMAILER_LANG["signing"] = 'Error al firmar: ';
 25+
 26+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-es.php
___________________________________________________________________
Added: svn:keywords
127 + Id
Added: svn:eol-style
228 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-fr.php
@@ -0,0 +1,26 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * French Version
 6+ */
 7+
 8+$PHPMAILER_LANG = array();
 9+
 10+$PHPMAILER_LANG["provide_address"] = 'Vous devez fournir au moins une ' .
 11+ 'adresse de destinataire.';
 12+$PHPMAILER_LANG["mailer_not_supported"] = ' client de messagerie non supporté.';
 13+$PHPMAILER_LANG["execute"] = 'Impossible de lancer l\'exécution : ';
 14+$PHPMAILER_LANG["instantiate"] = 'Impossible d\'instancier la fonction mail.';
 15+$PHPMAILER_LANG["authenticate"] = 'Erreur SMTP : Echec de l\'authentification.';
 16+$PHPMAILER_LANG["from_failed"] = 'L\'adresse d\'expéditeur suivante a échouée : ';
 17+$PHPMAILER_LANG["recipients_failed"] = 'Erreur SMTP : Les destinataires ' .
 18+ 'suivants sont en erreur : ';
 19+$PHPMAILER_LANG["data_not_accepted"] = 'Erreur SMTP : Données incorrects.';
 20+$PHPMAILER_LANG["connect_host"] = 'Erreur SMTP : Impossible de se connecter au serveur SMTP.';
 21+$PHPMAILER_LANG["file_access"] = 'Impossible d\'accéder au fichier : ';
 22+$PHPMAILER_LANG["file_open"] = 'Erreur Fichier : ouverture impossible : ';
 23+$PHPMAILER_LANG["encoding"] = 'Encodage inconnu : ';
 24+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 25+
 26+?>
 27+
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-fr.php
___________________________________________________________________
Added: svn:keywords
128 + Id
Added: svn:eol-style
229 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-et.php
@@ -0,0 +1,24 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Estonian Version
 6+ * By Indrek P&auml;ri
 7+ */
 8+
 9+$PHPMAILER_LANG = array();
 10+
 11+$PHPMAILER_LANG["provide_address"] = 'Te peate m&auml;&auml;rama v&auml;hemalt &uuml;he saaja e-posti aadressi.';
 12+$PHPMAILER_LANG["mailer_not_supported"] = ' maileri tugi puudub.';
 13+$PHPMAILER_LANG["execute"] = 'Tegevus eba&otilde;nnestus: ';
 14+$PHPMAILER_LANG["instantiate"] = 'mail funktiooni k&auml;ivitamine eba&otilde;nnestus.';
 15+$PHPMAILER_LANG["authenticate"] = 'SMTP Viga: Autoriseerimise viga.';
 16+$PHPMAILER_LANG["from_failed"] = 'J&auml;rgnev saatja e-posti aadress on vigane: ';
 17+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Viga: J&auml;rgnevate saajate e-posti aadressid on vigased: ';
 18+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Viga: Vigased andmed.';
 19+$PHPMAILER_LANG["connect_host"] = 'SMTP Viga: Ei &otilde;nnestunud luua &uuml;hendust SMTP serveriga.';
 20+$PHPMAILER_LANG["file_access"] = 'Pole piisavalt &otilde;iguseid j&auml;rgneva faili avamiseks: ';
 21+$PHPMAILER_LANG["file_open"] = 'Faili Viga: Faili avamine eba&otilde;nnestus: ';
 22+$PHPMAILER_LANG["encoding"] = 'Tundmatu Unknown kodeering: ';
 23+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 24+
 25+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-et.php
___________________________________________________________________
Added: svn:eol-style
126 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-nl.php
@@ -0,0 +1,25 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Dutch Version
 6+ */
 7+
 8+$PHPMAILER_LANG = array();
 9+
 10+$PHPMAILER_LANG["provide_address"] = 'Er moet tenmiste &eacute;&eacute;n ' .
 11+ 'ontvanger emailadres opgegeven worden.';
 12+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer wordt niet ondersteund.';
 13+$PHPMAILER_LANG["execute"] = 'Kon niet uitvoeren: ';
 14+$PHPMAILER_LANG["instantiate"] = 'Kon mail functie niet initialiseren.';
 15+$PHPMAILER_LANG["authenticate"] = 'SMTP Fout: authenticatie mislukt.';
 16+$PHPMAILER_LANG["from_failed"] = 'De volgende afzender adressen zijn mislukt: ';
 17+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Fout: De volgende ' .
 18+ 'ontvangers zijn mislukt: ';
 19+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Fout: Data niet geaccepteerd.';
 20+$PHPMAILER_LANG["connect_host"] = 'SMTP Fout: Kon niet verbinden met SMTP host.';
 21+$PHPMAILER_LANG["file_access"] = 'Kreeg geen toegang tot bestand: ';
 22+$PHPMAILER_LANG["file_open"] = 'Bestandsfout: Kon bestand niet openen: ';
 23+$PHPMAILER_LANG["encoding"] = 'Onbekende codering: ';
 24+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 25+
 26+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-nl.php
___________________________________________________________________
Added: svn:keywords
127 + Id
Added: svn:eol-style
228 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-pl.php
@@ -0,0 +1,25 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Polish Version, encoding: windows-1250
 6+ * translated from english lang file ver. 1.72
 7+ */
 8+
 9+$PHPMAILER_LANG = array();
 10+
 11+$PHPMAILER_LANG["provide_address"] = 'Nale¿y podaæ prawid³owy adres email Odbiorcy.';
 12+$PHPMAILER_LANG["mailer_not_supported"] = 'Wybrana metoda wysy³ki wiadomoœci nie jest obs³ugiwana.';
 13+$PHPMAILER_LANG["execute"] = 'Nie mo¿na uruchomiæ: ';
 14+$PHPMAILER_LANG["instantiate"] = 'Nie mo¿na wywo³aæ funkcji mail(). SprawdŸ konfiguracjê serwera.';
 15+$PHPMAILER_LANG["authenticate"] = 'B³¹d SMTP: Nie mo¿na przeprowadziæ autentykacji.';
 16+$PHPMAILER_LANG["from_failed"] = 'Nastêpuj¹cy adres Nadawcy jest jest nieprawid³owy: ';
 17+$PHPMAILER_LANG["recipients_failed"] = 'B³¹d SMTP: Nastêpuj¹cy ' .
 18+ 'odbiorcy s¹ nieprawid³owi: ';
 19+$PHPMAILER_LANG["data_not_accepted"] = 'B³¹d SMTP: Dane nie zosta³y przyjête.';
 20+$PHPMAILER_LANG["connect_host"] = 'B³¹d SMTP: Nie mo¿na po³¹czyæ siê z wybranym hostem.';
 21+$PHPMAILER_LANG["file_access"] = 'Brak dostêpu do pliku: ';
 22+$PHPMAILER_LANG["file_open"] = 'Nie mo¿na otworzyæ pliku: ';
 23+$PHPMAILER_LANG["encoding"] = 'Nieznany sposób kodowania znaków: ';
 24+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 25+
 26+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-pl.php
___________________________________________________________________
Added: svn:keywords
127 + Id
Added: svn:eol-style
228 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-cz.php
@@ -0,0 +1,26 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Czech Version
 6+ */
 7+
 8+$PHPMAILER_LANG = array();
 9+
 10+$PHPMAILER_LANG["provide_address"] = 'Musíte zadat alespoò jednu ' .
 11+ 'emailovou adresu pøíjemce.';
 12+$PHPMAILER_LANG["mailer_not_supported"] = ' mailový klient není podporován.';
 13+$PHPMAILER_LANG["execute"] = 'Nelze provést: ';
 14+$PHPMAILER_LANG["instantiate"] = 'Nelze vytvoøit instanci emailové funkce.';
 15+$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Chyba autentikace.';
 16+$PHPMAILER_LANG["from_failed"] = 'Následující adresa From je nesprávná: ';
 17+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: Adresy pøíjemcù ' .
 18+ 'nejsou správné ' .
 19+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data nebyla pøijata';
 20+$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Nelze navázat spojení se ' .
 21+ ' SMTP serverem.';
 22+$PHPMAILER_LANG["file_access"] = 'Soubor nenalezen: ';
 23+$PHPMAILER_LANG["file_open"] = 'File Error: Nelze otevøít soubor pro ètení: ';
 24+$PHPMAILER_LANG["encoding"] = 'Neznámé kódování: ';
 25+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 26+
 27+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-cz.php
___________________________________________________________________
Added: svn:keywords
128 + Id
Added: svn:eol-style
229 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-hu.php
@@ -0,0 +1,25 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Hungarian Version
 6+ */
 7+
 8+$PHPMAILER_LANG = array();
 9+
 10+$PHPMAILER_LANG["provide_address"] = 'Meg kell adnod legalább egy ' .
 11+ 'címzett email címet.';
 12+$PHPMAILER_LANG["mailer_not_supported"] = ' levelezõ nem támogatott.';
 13+$PHPMAILER_LANG["execute"] = 'Nem tudtam végrehajtani: ';
 14+$PHPMAILER_LANG["instantiate"] = 'Nem sikerült példányosítani a mail funkciót.';
 15+$PHPMAILER_LANG["authenticate"] = 'SMTP Hiba: Sikertelen autentikáció.';
 16+$PHPMAILER_LANG["from_failed"] = 'Az alábbi Feladó cím hibás: ';
 17+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Hiba: Az alábbi ' .
 18+ 'címzettek hibásak: ';
 19+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Hiba: Nem elfogadható adat.';
 20+$PHPMAILER_LANG["connect_host"] = 'SMTP Hiba: Nem tudtam csatlakozni az SMTP host-hoz.';
 21+$PHPMAILER_LANG["file_access"] = 'Nem sikerült elérni a következõ fájlt: ';
 22+$PHPMAILER_LANG["file_open"] = 'Fájl Hiba: Nem sikerült megnyitni a következõ fájlt: ';
 23+$PHPMAILER_LANG["encoding"] = 'Ismeretlen kódolás: ';
 24+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 25+
 26+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-hu.php
___________________________________________________________________
Added: svn:keywords
127 + Id
Added: svn:eol-style
228 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-it.php
@@ -0,0 +1,30 @@
 2+<?php
 3+/**
 4+* PHPMailer language file.
 5+* Italian version
 6+* @package PHPMailer
 7+* @author Ilias Bartolini <brain79@inwind.it>
 8+*/
 9+
 10+$PHPMAILER_LANG = array();
 11+
 12+$PHPMAILER_LANG["provide_address"] = 'Deve essere fornito almeno un'.
 13+ ' indirizzo ricevente';
 14+$PHPMAILER_LANG["mailer_not_supported"] = 'Mailer non supportato';
 15+$PHPMAILER_LANG["execute"] = "Impossibile eseguire l'operazione: ";
 16+$PHPMAILER_LANG["instantiate"] = 'Impossibile istanziare la funzione mail';
 17+$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Impossibile autenticarsi.';
 18+$PHPMAILER_LANG["from_failed"] = 'I seguenti indirizzi mittenti hanno'.
 19+ ' generato errore: ';
 20+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: I seguenti indirizzi'.
 21+ 'destinatari hanno generato errore: ';
 22+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data non accettati dal'.
 23+ 'server.';
 24+$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Impossibile connettersi'.
 25+ ' all\'host SMTP.';
 26+$PHPMAILER_LANG["file_access"] = 'Impossibile accedere al file: ';
 27+$PHPMAILER_LANG["file_open"] = 'File Error: Impossibile aprire il file: ';
 28+$PHPMAILER_LANG["encoding"] = 'Encoding set dei caratteri sconosciuto: ';
 29+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 30+
 31+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-it.php
___________________________________________________________________
Added: svn:keywords
132 + Id
Added: svn:eol-style
233 + native
Index: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-no.php
@@ -0,0 +1,25 @@
 2+<?php
 3+/**
 4+ * PHPMailer language file.
 5+ * Norwegian Version
 6+ */
 7+
 8+$PHPMAILER_LANG = array();
 9+
 10+$PHPMAILER_LANG["provide_address"] = 'Du må ha med minst en' .
 11+ 'mottager adresse.';
 12+$PHPMAILER_LANG["mailer_not_supported"] = ' mailer er ikke supportert.';
 13+$PHPMAILER_LANG["execute"] = 'Kunne ikke utføre: ';
 14+$PHPMAILER_LANG["instantiate"] = 'Kunne ikke instantiate mail funksjonen.';
 15+$PHPMAILER_LANG["authenticate"] = 'SMTP Feil: Kunne ikke authentisere.';
 16+$PHPMAILER_LANG["from_failed"] = 'Følgende Fra feilet: ';
 17+$PHPMAILER_LANG["recipients_failed"] = 'SMTP Feil: Følgende' .
 18+ 'mottagere feilet: ';
 19+$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Feil: Data ble ikke akseptert.';
 20+$PHPMAILER_LANG["connect_host"] = 'SMTP Feil: Kunne ikke koble til SMTP host.';
 21+$PHPMAILER_LANG["file_access"] = 'Kunne ikke få tilgang til filen: ';
 22+$PHPMAILER_LANG["file_open"] = 'Fil feil: Kunne ikke åpne filen: ';
 23+$PHPMAILER_LANG["encoding"] = 'Ukjent encoding: ';
 24+$PHPMAILER_LANG["signing"] = 'Signing Error: ';
 25+
 26+?>
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1/language/phpmailer.lang-no.php
___________________________________________________________________
Added: svn:eol-style
127 + native
Property changes on: trunk/extensions/EmailPage/phpMailer_v2.1
___________________________________________________________________
Added: svn:mergeinfo
Index: trunk/extensions/EmailPage/EmailPage.i18n.php
@@ -0,0 +1,400 @@
 2+<?php
 3+/**
 4+ * Internationalisation file for extension EmailPage.
 5+ *
 6+ * @addtogroup Extensions
 7+*/
 8+
 9+$messages = array();
 10+
 11+/** English
 12+ * @author Nad
 13+ */
 14+$messages['en'] = array(
 15+ 'emailpage' => 'E-mail page',
 16+ 'ea-desc' => 'Send rendered HTML page to an e-mail address or list of addresses using [http://phpmailer.sourceforge.net phpmailer].',
 17+ 'ea-heading' => "=== E-mailing the page [[$1]] ===",
 18+ 'ea-fromgroup' => 'From group:',
 19+ 'ea-pagesend' => 'Page "$1" sent from $2',
 20+ 'ea-nopage' => "Please specify a page to send, for example [[Special:EmailPage/Main Page]].",
 21+ 'ea-norecipients' => "No valid e-mail addresses found!",
 22+ 'ea-listrecipients' => "=== {{PLURAL:$1|Recipient|$1 recipients}} ===",
 23+ 'ea-error' => "'''Error sending [[$1]]:''' ''$2''",
 24+ 'ea-denied' => 'Permission denied',
 25+ 'ea-sent' => "Page [[$1]] sent successfully to '''$2''' {{PLURAL:$2|recipient|recipients}} by [[User:$3|$3]].",
 26+ 'ea-selectrecipients' => 'Select recipients',
 27+ 'ea-compose' => 'Compose content',
 28+ 'ea-selectlist' => "Additional recipients as page titles or e-mail addresses
 29+*''separate items with , ; * \\n
 30+*''list can contain templates and parser-functions''",
 31+ 'ea-show' => 'Show recipients',
 32+ 'ea-send' => 'Send!',
 33+ 'ea-subject' => 'Enter a subject line for the e-mail',
 34+ 'ea-header' => 'Prepend content with optional message (wikitext)',
 35+ 'ea-selectcss' => 'Select a CSS stylesheet',
 36+);
 37+
 38+/** Arabic (العربية)
 39+ * @author OsamaK
 40+ * @author Meno25
 41+ */
 42+$messages['ar'] = array(
 43+ 'emailpage' => 'مراسلة الصفحة',
 44+ 'ea-heading' => '=== مراسلة صفحة [[$1]] ===',
 45+ 'ea-fromgroup' => 'من مجموعة:',
 46+ 'ea-pagesend' => 'الصفحة "$1" أُرسلت من $2',
 47+ 'ea-norecipients' => 'لا عناوين بريد إلكتروني صحيحة وُجدت!',
 48+ 'ea-error' => "'''خطأ في إرسال [[$1]]:''' ''$2''",
 49+ 'ea-denied' => 'السماح مرفوض',
 50+ 'ea-selectrecipients' => 'اختر المتلقين',
 51+ 'ea-compose' => 'كتابة المحتوى',
 52+ 'ea-send' => 'أرسل!',
 53+ 'ea-subject' => 'أدخل سطر عنوان للبريد الإلكتروني',
 54+);
 55+
 56+/** Bulgarian (Български)
 57+ * @author DCLXVI
 58+ */
 59+$messages['bg'] = array(
 60+ 'ea-fromgroup' => 'От група:',
 61+ 'ea-nopage' => 'Необходимо е да се посочи страница, която да бъде изпратена, напр. [[Special:EmailPage/Начална страница]].',
 62+ 'ea-norecipients' => 'Не бяха намерени валидни адреси за е-поща!',
 63+ 'ea-listrecipients' => '=== Списък на $1 {{PLURAL:$1|получател|получателя}} ===',
 64+ 'ea-error' => "'''Грешка при изпращане на [[$1]]:''' ''$2''",
 65+ 'ea-selectrecipients' => 'Избиране на получатели',
 66+ 'ea-show' => 'Показване на получателите',
 67+ 'ea-send' => 'Изпращане!',
 68+ 'ea-selectcss' => 'Избиране на CSS стил',
 69+);
 70+
 71+/** Esperanto (Esperanto)
 72+ * @author Yekrats
 73+ */
 74+$messages['eo'] = array(
 75+ 'emailpage' => 'Retpoŝtigi paĝon',
 76+ 'ea-heading' => '=== Retpoŝtigante paĝon [[$1]] ===',
 77+ 'ea-fromgroup' => 'De grupo:',
 78+ 'ea-pagesend' => 'Paĝo "$1" sendita de $2',
 79+ 'ea-nopage' => 'Bonvolu enigi paĝon por retsendi, ekz-e [[Special:EmailPage/Main Page]].',
 80+ 'ea-norecipients' => 'Neniaj validaj retadresoj trovitaj!',
 81+ 'ea-listrecipients' => '=== Listo de $1 {{PLURAL:$1|ricevonto|ricevontoj}} ===',
 82+ 'ea-error' => "'''Eraro sendante [[$1]]:''' ''$2''",
 83+ 'ea-denied' => 'Malpermesite',
 84+ 'ea-sent' => "Paĝo [[$1]] sendita sukcese al '''$2''' {{PLURAL:$2|ricevonto|ricevontoj}} de [[User:$3|$3]].",
 85+ 'ea-selectrecipients' => 'Selektu ricevontojn',
 86+ 'ea-compose' => 'Skribu enhavon',
 87+ 'ea-send' => 'Sendi!',
 88+ 'ea-selectcss' => 'Selekti CSS-tiparŝablono',
 89+);
 90+
 91+/** French (Français)
 92+ * @author Grondin
 93+ */
 94+$messages['fr'] = array(
 95+ 'emailpage' => 'Envoyer l’article par courriel',
 96+ 'ea-desc' => 'Envoie le rendu d’une page HTML à une adresse électronique où à une liste d’adresses en utilisant [http://phpmailer.sourceforge.net phpmailer]',
 97+ 'ea-heading' => '=== Envoi de la page [[$1]] par courrier électronique ===',
 98+ 'ea-fromgroup' => 'Depuis le groupe :',
 99+ 'ea-pagesend' => 'Page « $1 » envoyée depuis $2',
 100+ 'ea-nopage' => 'Veuillez spécifier une page à envoyer, par exemple [[Special:EmailPage/Accueil]]',
 101+ 'ea-norecipients' => 'Aucune adresse courriel de trouvée !',
 102+ 'ea-listrecipients' => '=== Liste de $1 {{PLURAL:$1|destinataire|destinataires}} ===',
 103+ 'ea-error' => "'''Erreur de l’envoi de [[$1]] :''' ''$2''",
 104+ 'ea-denied' => 'Permission refusée',
 105+ 'ea-sent' => "L'article [[$1]] a été envoyé avec succès à '''$2''' {{PLURAL:$2|destinataire|destinataires}} par [[User:$3|$3]].",
 106+ 'ea-selectrecipients' => 'Sélectionner les destinataires',
 107+ 'ea-compose' => 'Composer le contenu',
 108+ 'ea-selectlist' => "Destinataires supplémentaires comme les titres d'articles ou les adresses courriel
 109+* ''séparer les articles avec , : * \\n''
 110+* ''la liste peut contenir des modèles et des fonctions parseurs''",
 111+ 'ea-show' => 'Visionner les destinataires',
 112+ 'ea-send' => 'Envoyer !',
 113+ 'ea-subject' => 'Entrer une ligne « objet » pour le courriel',
 114+ 'ea-header' => 'Ajouter le contenu au début avec un message facultatif (texte wiki)',
 115+ 'ea-selectcss' => 'Sélectionner une feuille de style CSS',
 116+);
 117+
 118+/** Galician (Galego)
 119+ * @author Toliño
 120+ */
 121+$messages['gl'] = array(
 122+ 'emailpage' => 'Enviar a páxina por correo electrónico',
 123+ 'ea-desc' => 'Enviar páxinas HTML renderizadas a un enderezo de correo electrónico (ou a varios correos) usando [http://phpmailer.sourceforge.net phpmailer].',
 124+ 'ea-heading' => '=== Enviando a páxina "[[$1]]" ===',
 125+ 'ea-fromgroup' => 'Desde o grupo:',
 126+ 'ea-pagesend' => 'O artigo "$1" foi enviado desde $2',
 127+ 'ea-nopage' => 'Por favor, especifique a páxina que quere enviar, por exemplo: [[Special:EmailPage/Main Page]].',
 128+ 'ea-norecipients' => 'Non foi atopado ningún enderezo de correo electrónico válido!',
 129+ 'ea-listrecipients' => '=== {{PLURAL:$1|Nome do destinatario|Listaxe dos $1 destinatarios}} ===',
 130+ 'ea-error' => "'''Erro no envío de \"[[\$1]]\":''' ''\$2''",
 131+ 'ea-denied' => 'Permiso denegado',
 132+ 'ea-sent' => 'A páxina "[[$1]]" foi enviada con éxito a \'\'\'$2\'\'\' {{PLURAL:$2|destinatario|destinatarios}} por [[User:$3|$3]].',
 133+ 'ea-selectrecipients' => 'Seleccionar os destinatarios',
 134+ 'ea-compose' => 'Compoñer o contido',
 135+ 'ea-selectlist' => "Destinatarios adicionais como títulos de páxinas ou correos electrónicos
 136+*''separar os ítems con , ; * \\n
 137+*''a listaxe`pode conter modelos e funcións analíticas''",
 138+ 'ea-show' => 'Amosar os destinatarios',
 139+ 'ea-send' => 'Enviar!',
 140+ 'ea-subject' => 'Introducir un asunto ao correo electrónico',
 141+ 'ea-header' => 'Engadir o contido cunha mensaxe opcional (texto wiki)',
 142+ 'ea-selectcss' => 'Seleccionar unha folla de estilo CSS',
 143+);
 144+
 145+/** Khmer (ភាសាខ្មែរ)
 146+ * @author Lovekhmer
 147+ */
 148+$messages['km'] = array(
 149+ 'emailpage' => 'ទំព័រអ៊ីមែល',
 150+ 'ea-fromgroup' => 'ពីក្រុម:',
 151+ 'ea-pagesend' => 'ទំព័រ"$1"ត្រូវបានបញ្ជូនពី$2',
 152+ 'ea-send' => 'ផ្ញើ!',
 153+);
 154+
 155+/** Luxembourgish (Lëtzebuergesch)
 156+ * @author Robby
 157+ */
 158+$messages['lb'] = array(
 159+ 'emailpage' => 'Säit per Mail schécken',
 160+ 'ea-heading' => '=== Säit [[$1]] peer E-Mail verschécken ===',
 161+ 'ea-fromgroup' => 'Vun der Grupp:',
 162+ 'ea-pagesend' => 'D\'Säit "$1" gouf verschéckt vum $2',
 163+ 'ea-norecipients' => 'Keng gëlteg E-Mailadress fonnt',
 164+ 'ea-denied' => 'Rechter refuséiert',
 165+ 'ea-selectrecipients' => 'Adressaten erauswielen',
 166+ 'ea-show' => 'Adressate weisen',
 167+ 'ea-send' => 'Schécken!',
 168+ 'ea-subject' => "Gitt w.e.g. e Sujet fir d'E-Mail an",
 169+ 'ea-selectcss' => "Een ''CSS Stylesheet'' auswielen",
 170+);
 171+
 172+/** Malayalam (മലയാളം)
 173+ * @author Shijualex
 174+ */
 175+$messages['ml'] = array(
 176+ 'emailpage' => 'ഇമെയില്‍ താള്‍',
 177+ 'ea-heading' => '=== [[$1]] എന്ന താള്‍ ഇമെയില്‍ ചെയ്യുന്നു ===',
 178+ 'ea-fromgroup' => 'ഗ്രൂപ്പ്:',
 179+ 'ea-pagesend' => '$2 സം‌രംഭത്തില്‍ നിന്നു "$1" എന്ന താള്‍ അയച്ചു',
 180+ 'ea-nopage' => 'അയക്കുവാന്‍ വേണ്ടി ഒരു താള്‍ തിരഞ്ഞെടുക്കുക. ഉദാ: [[Special:EmailPage/Main Page]]',
 181+ 'ea-norecipients' => 'സാധുവായ ഇമെയില്‍ വിലാസങ്ങള്‍ കണ്ടില്ല!',
 182+ 'ea-listrecipients' => '=== $1 {{PLURAL:$1|സ്വീകര്‍ത്താവിന്റെ|സ്വീകര്‍ത്താക്കളുടെ}} പട്ടിക ===',
 183+ 'ea-error' => "'''[[$1]] അയക്കുന്നതില്‍ പിഴവ്:''' ''$2''",
 184+ 'ea-denied' => 'അനുവാദം നിഷേധിച്ചിരിക്കുന്നു',
 185+ 'ea-sent' => "[[User:$3|$3]] എന്ന ഉപയോക്താവ് [[$1]] എന്ന താള്‍ വിജയകരമായി '''$2''' {{PLURAL:$2|സ്വീകര്‍ത്താവിനു|സ്വീകര്‍ത്താക്കള്‍ക്ക്}} അയച്ചിരിക്കുന്നു.",
 186+ 'ea-selectrecipients' => 'സ്വീകര്‍ത്താക്കളെ‍ തിരഞ്ഞെടുക്കുക',
 187+ 'ea-compose' => 'ഉള്ളടക്കം ചേര്‍ക്കുക',
 188+ 'ea-show' => 'സ്വീകര്‍ത്താക്കളെ പ്രദര്‍ശിപ്പിക്കുക',
 189+ 'ea-send' => 'അയക്കൂ!',
 190+ 'ea-subject' => 'ഇമെയിലിനു ഒരു വിഷയം/ശീര്‍ഷകം ചേര്‍ക്കുക',
 191+);
 192+
 193+/** Marathi (मराठी)
 194+ * @author Kaustubh
 195+ */
 196+$messages['mr'] = array(
 197+ 'emailpage' => 'पान इ-मेल करा',
 198+ 'ea-desc' => ' [http://phpmailer.sourceforge.net पीएचपी मेलर] चा वापर करून एखादे पान एखाद्या इ-मेल पत्त्यावर किंवा इ-मेल पत्त्यांच्या यादीवर पाठवा.',
 199+ 'ea-heading' => '=== [[$1]] पान इ-मेल करीत आहे ===',
 200+ 'ea-fromgroup' => 'गटाकडून:',
 201+ 'ea-pagesend' => '$2 ने "$1" पान पाठविले',
 202+ 'ea-nopage' => 'कृपया पाठविण्यासाठी एक पान निवडा, उदाहरणासाठी [[Special:EmailPage/Main Page]].',
 203+ 'ea-norecipients' => 'योग्य इ-मेल पत्ता सापडला नाही!',
 204+ 'ea-listrecipients' => '=== $1 {{PLURAL:$1|सदस्याची|सदस्यांची}}यादी ===',
 205+ 'ea-error' => "'''पाठविण्यामध्ये त्रुटी [[$1]]:''' ''$2''",
 206+ 'ea-denied' => 'परवानगी नाकारली',
 207+ 'ea-sent' => "[[User:$3|$3]] ने [[$1]] पान '''$2''' {{PLURAL:$2|सदस्याला|सदस्यांना}} पाठविले.",
 208+ 'ea-selectrecipients' => 'सदस्य निवडा',
 209+ 'ea-compose' => 'मजकूर लिहा',
 210+ 'ea-selectlist' => "जास्तीचे सदस्य लेख शीर्षक किंवा इ-मेल पत्ता
 211+*'', ; चा वापर करून वेगळे करा* \\n
 212+*''यादी मध्ये साचे तसेच पार्सर क्रिया वापरता येतील''",
 213+ 'ea-show' => 'निवडलेले सदस्य दाखवा',
 214+ 'ea-send' => 'पाठवा!',
 215+ 'ea-subject' => 'इ-मेल चा विषय लिहा',
 216+ 'ea-header' => 'मजकूरा आधी वैकल्पिक संदेश लिहा (विकिसंज्ञा)',
 217+ 'ea-selectcss' => 'सीएसएस स्टाइलशीट पाठवा',
 218+);
 219+
 220+/** Low German (Plattdüütsch)
 221+ * @author Slomox
 222+ */
 223+$messages['nds'] = array(
 224+ 'ea-fromgroup' => 'Vun Grupp:',
 225+);
 226+
 227+/** Dutch (Nederlands)
 228+ * @author Siebrand
 229+ */
 230+$messages['nl'] = array(
 231+ 'emailpage' => 'Pagina e-mailen',
 232+ 'ea-desc' => 'Stuur een gerenderde pagina naar een e-mailadres of een lijst van adressen met behulp van [http://phpmailer.sourceforge.net phpmailer].',
 233+ 'ea-heading' => '=== Pagina [[$1]] e-mailen ===',
 234+ 'ea-fromgroup' => 'Van groep:',
 235+ 'ea-pagesend' => 'Pagina "$1" is vanuit $2 verstuurd',
 236+ 'ea-nopage' => 'Geef een pagina op om te versturen, bijvoorbeeld [[Special:EmailPage/Hoofdpagina]].',
 237+ 'ea-norecipients' => 'Er is geen geldig e-mailadres opgegeven!',
 238+ 'ea-listrecipients' => '=== Lijst met $1 {{PLURAL:$1|ontvanger|ontvangers}} ===',
 239+ 'ea-error' => "'''Fout bij het versturen van [[$1]]:''' ''$2''",
 240+ 'ea-denied' => 'U hebt geen rechten om deze handeling uit te voeren',
 241+ 'ea-sent' => "Pagina [[$1]] is verstuurd naar '''$2''' {{PLURAL:$2|ontvanger|ontvangers}} door [[User:$3|$3]].",
 242+ 'ea-selectrecipients' => 'Ontvangers selecteren',
 243+ 'ea-compose' => 'Inhoud samenstellen',
 244+ 'ea-selectlist' => 'Meer ontvangers als paginanamen of e-mailadressen
 245+*\'\'u kunt adressen scheiden met ",", ";", "*", of "\\n"
 246+*\'\'de lijst mag sjablonen en parserfuncties bevatten\'\'',
 247+ 'ea-show' => 'Ontvangers weergeven',
 248+ 'ea-send' => 'Versturen',
 249+ 'ea-subject' => 'Voer een onderwerp in voor de e-mail',
 250+ 'ea-header' => 'Laat de pagina-inhoud vooraf gaan door een bericht (in wikitekst)',
 251+ 'ea-selectcss' => 'Selecteer een CSS',
 252+);
 253+
 254+/** Norwegian (bokmål)‬ (‪Norsk (bokmål)‬)
 255+ * @author Jon Harald Søby
 256+ */
 257+$messages['no'] = array(
 258+ 'emailpage' => 'Send side som e-post',
 259+ 'ea-desc' => 'Send HTML-side til en eller flere e-postadresser ved hjelp av [http://phpmailer.sourceforge.net/ phpmailer].',
 260+ 'ea-heading' => '=== Send siden [[$1]] som e-post ===',
 261+ 'ea-fromgroup' => 'Fra gruppe:',
 262+ 'ea-pagesend' => 'Siden «$1» sendt fra $2',
 263+ 'ea-nopage' => 'Oppgi en side du vil sende, for eksempel [[Special:EmailPage/{{MediaWiki:Mainpage}}]].',
 264+ 'ea-norecipients' => 'Ingen gyldige e-postadresser funnet.',
 265+ 'ea-listrecipients' => '=== Liste over $1 {{PLURAL:$1|mottaker|mottakere}} ===',
 266+ 'ea-error' => "'''Feil under sending av [[$1]]:''' ''$2''",
 267+ 'ea-denied' => 'Ingen adgang',
 268+ 'ea-sent' => "Siden [[$1]] ble sendt til '''$2''' {{PLURAL:$2|mottaker|mottakere}} av [[User:$3|$3]].",
 269+ 'ea-selectrecipients' => 'Velg mottakere',
 270+ 'ea-compose' => 'Skriv inn innhold',
 271+ 'ea-selectlist' => "Ytterligere mottakere som sidetitler eller e-postadresser
 272+* ''skill elementer med , ; * \\n
 273+* ''listen kan inneholde maler og parserfunksjoner''",
 274+ 'ea-show' => 'Vis mottakere',
 275+ 'ea-send' => 'Send',
 276+ 'ea-subject' => 'Skriv inn et emne for e-posten',
 277+ 'ea-header' => 'Fyll innholdet med en valgfri beskjed (wikitekst)',
 278+ 'ea-selectcss' => 'Angi en CSS-stilmal',
 279+);
 280+
 281+/** Occitan (Occitan)
 282+ * @author Cedric31
 283+ */
 284+$messages['oc'] = array(
 285+ 'emailpage' => 'Mandar l’article per corrièr electronic',
 286+ 'ea-desc' => 'Manda lo rendut d’una pagina HTML a una adreça electronica o a una tièra d’adreças en utilizant [http://phpmailer.sourceforge.net phpmailer]',
 287+ 'ea-heading' => '=== Mandadís de la pagina [[$1]] per corrièr electronic ===',
 288+ 'ea-fromgroup' => 'Dempuèi lo grop :',
 289+ 'ea-pagesend' => 'Pagina « $1 » mandada dempuèi $2',
 290+ 'ea-nopage' => 'Especificatz una pagina de mandar, per exemple [[Special:EmailPage/Acuèlh]]',
 291+ 'ea-norecipients' => "Cap d'adreça de corrièr electronic pas trobada !",
 292+ 'ea-listrecipients' => '=== Tièra de $1 {{PLURAL:$1|destinatari|destinataris}} ===',
 293+ 'ea-error' => "'''Error del mandadís de [[$1]] :''' ''$2''",
 294+ 'ea-denied' => 'Permission refusada',
 295+ 'ea-sent' => "L'article [[$1]] es estat mandat amb succès a '''$2''' {{PLURAL:$2|destinatari|destinataris}} per [[User:$3|$3]].",
 296+ 'ea-selectrecipients' => 'Seleccionar los destinataris',
 297+ 'ea-compose' => 'Compausar lo contengut',
 298+ 'ea-selectlist' => "Destinataris suplementaris coma los títols d'articles o las adreças de corrièr electronic
 299+* ''separar los articles amb , : * \\n''
 300+* ''la tièra pòt conténer de modèls e de foncions parsaires''",
 301+ 'ea-show' => 'Visionar los destinataris',
 302+ 'ea-send' => 'Mandar !',
 303+ 'ea-subject' => 'Entrar una linha « objècte » pel corrièr electronic',
 304+ 'ea-header' => 'Apondre lo contengut al començament amb un messatge facultatiu (tèxt wiki)',
 305+ 'ea-selectcss' => "Seleccionar un fuèlh d'estil CSS",
 306+);
 307+
 308+/** Slovak (Slovenčina)
 309+ * @author Helix84
 310+ */
 311+$messages['sk'] = array(
 312+ 'emailpage' => 'Poslať stránku emailom',
 313+ 'ea-desc' => 'Poslať stránku vo formáte HTML na emailovú adresu alebo zoznam adries pomocou [http://phpmailer.sourceforge.net phpmailer].',
 314+ 'ea-heading' => '=== Poslanie stránky [[$1]] emailom ===',
 315+ 'ea-fromgroup' => 'Zo skupiny:',
 316+ 'ea-pagesend' => 'Článok „$1” poslaný z $2',
 317+ 'ea-nopage' => 'Prosím, uveďte stránku, ktorú chcete poslať, napr. [[Special:EmailPage/Hlavná stránka]].',
 318+ 'ea-norecipients' => 'Nebola nájdená platná emailová adresa!',
 319+ 'ea-listrecipients' => '=== Zoznam $1 {{PLURAL:$1|príjemcu|príjemcov}} ===',
 320+ 'ea-error' => "'''Chyba pri odosielaní [[$1]]:''' ''$2''",
 321+ 'ea-denied' => 'Nemáte potrebné oprávnenie',
 322+ 'ea-sent' => "[[User:$3|$3]] úspešne poslal stránku [[$1]] '''$2''' {{PLURAL:$2|používateľovi|používateľom}}.",
 323+ 'ea-selectrecipients' => 'Vybrať príjemcov',
 324+ 'ea-compose' => 'Napísať obsah správy',
 325+ 'ea-selectlist' => "Ďalší príjemci vo forme názvov stránok alebo emailových adries
 326+*''položky oddeľujte pomocu , ; * \\n
 327+*''zoznam môže obsahovať šablóny a funkcie syntaktického analyzátora''",
 328+ 'ea-show' => 'Zobraziť príjemcov',
 329+ 'ea-send' => 'Poslať!',
 330+ 'ea-subject' => 'Zadajte predmet emailu',
 331+ 'ea-header' => 'Pred obsah pridať (nepovinne) správu (wikitext)',
 332+ 'ea-selectcss' => 'Vyberte CSS štýl',
 333+);
 334+
 335+/** Sundanese (Basa Sunda)
 336+ * @author Irwangatot
 337+ */
 338+$messages['su'] = array(
 339+ 'ea-send' => 'Kintun!',
 340+);
 341+
 342+/** Swedish (Svenska)
 343+ * @author M.M.S.
 344+ */
 345+$messages['sv'] = array(
 346+ 'emailpage' => 'E-posta sida',
 347+ 'ea-desc' => 'Skicka en renderad HTML-sida till en e-postadress eller en lista över adresser som använder [http://phpmailer.sourceforge.net phpmailer].',
 348+ 'ea-heading' => '=== E-posta sidan [[$1]] ===',
 349+ 'ea-fromgroup' => 'Från grupp:',
 350+ 'ea-pagesend' => 'Artikeln "$1" skickades från $2',
 351+ 'ea-nopage' => 'Var god ange en sida att skicka, för exempel [[Special:EmailPage/Main Page]].',
 352+ 'ea-norecipients' => 'Inga giltiga e-postadresser hittades!',
 353+ 'ea-listrecipients' => '=== Lista över $1 {{PLURAL:$1|mottagare|mottagare}} ===',
 354+ 'ea-error' => "'''Fel under sändande av [[$1]]:''' ''$2''",
 355+ 'ea-denied' => 'Åtkomst nekas',
 356+ 'ea-sent' => "Sidan [[$1]] har skickats till '''$2''' {{PLURAL:$2|mottagare|mottagare}} av [[User:$3|$3]].",
 357+ 'ea-selectrecipients' => 'Ange mottagare',
 358+ 'ea-compose' => 'Komponera innehåll',
 359+ 'ea-selectlist' => "Ytterligare mottagare som sidtitlar eller e-postadresser
 360+*''separera element med, ; * \\n
 361+*''listor kan innehålla mallar och parser-funktioner''",
 362+ 'ea-show' => 'Visa mottagare',
 363+ 'ea-send' => 'Skicka!',
 364+ 'ea-subject' => 'Ange ett ämne för e-brevet',
 365+ 'ea-header' => 'Fyll innehållet med ett valfritt meddelande (wikitext)',
 366+ 'ea-selectcss' => 'Ange en CSS-stilmall',
 367+);
 368+
 369+/** Telugu (తెలుగు)
 370+ * @author వైజాసత్య
 371+ * @author Veeven
 372+ */
 373+$messages['te'] = array(
 374+ 'ea-denied' => 'అనుమతిని నిరాకరించాం',
 375+ 'ea-send' => 'పంపించు!',
 376+);
 377+
 378+/** Vietnamese (Tiếng Việt)
 379+ * @author Vinhtantran
 380+ */
 381+$messages['vi'] = array(
 382+ 'emailpage' => 'Trang thư điện tử',
 383+ 'ea-desc' => 'Gửi trang HTML giản lược đến một địa chỉ hoặc danh sách các địa chỉ thư điện tử dùng [http://phpmailer.sourceforge.net phpmailer].',
 384+ 'ea-heading' => '=== Gửi trang [[$1]] ===',
 385+ 'ea-nopage' => 'Xin hãy xác định trang muốn gửi, ví dụ [[Special:EmailPage/Trang_Chính]].',
 386+ 'ea-norecipients' => 'Không tìm thấy địa chỉ thư điện tử hợp lệ!',
 387+ 'ea-listrecipients' => '=== Danh sách $1 {{PLURAL:$1|người nhận|người nhận}} ===',
 388+ 'ea-error' => "'''Lỗi khi gửi [[$1]]:''' ''$2''",
 389+ 'ea-sent' => "Trang [[$1]] đã được [[User:$3|$3]] gửi thành công đến '''$2''' {{PLURAL:$2|người nhận|người nhận}}.",
 390+ 'ea-selectrecipients' => 'Chọn người nhận',
 391+ 'ea-compose' => 'Soạn nội dung',
 392+ 'ea-selectlist' => "Những người nhận khác theo tựa đề trang hoặc địa chỉ thư điện tử
 393+*''phân cách các mục bằng , ; * \\n
 394+*''danh sách có thể chứa tiêu bản và hàm cú pháp''",
 395+ 'ea-show' => 'Hiển thị người nhận',
 396+ 'ea-send' => 'Gửi!',
 397+ 'ea-subject' => 'Nhập vào dòng tiêu đề cho thư điện tử',
 398+ 'ea-header' => 'Gắn nội dung với thông điệp tùy chọn (văn bản wiki)',
 399+ 'ea-selectcss' => 'Lựa chọn một kiểu trình bày CSS',
 400+);
 401+
Property changes on: trunk/extensions/EmailPage/EmailPage.i18n.php
___________________________________________________________________
Added: svn:mergeinfo
Added: svn:eol-style
1402 + native
Index: trunk/extensions/EmailPage/EmailPage.php
@@ -0,0 +1,73 @@
 2+<?php
 3+/**
 4+ * EmailPage extension - Send rendered HTML page to an email address or list of addresses using phpmailer
 5+ *
 6+ * See http://www.mediawiki.org/wiki/Extension:EmailPage for installation and usage details
 7+ *
 8+ * @package MediaWiki
 9+ * @subpackage Extensions
 10+ * @author Aran Dunkley [http://www.organicdesign.co.nz/nad User:Nad]
 11+ * @copyright © 2007 Aran Dunkley
 12+ * @licence GNU General Public Licence 2.0 or later
 13+ */
 14+
 15+if (!defined('MEDIAWIKI')) die('Not an entry point.');
 16+
 17+define('EMAILPAGE_VERSION', '1.2.0, 2008-07-13');
 18+
 19+$wgEmailPageGroup = 'sysop'; # Users must belong to this group to send emails (empty string means anyone can send)
 20+$wgEmailPageContactsCat = ''; # This specifies the name of a category containing categories of contact pages
 21+$wgEmailPageCss = 'EmailPage.css'; # A minimal CSS page to embed in the email (eg. monobook/main.css without portlets, actions etc)
 22+$wgEmailPageAllowRemoteAddr = array($_SERVER['SERVER_ADDR'],'127.0.0.1'); # Allow anonymous sending from these addresses
 23+$wgEmailPageAllowAllUsers = false; # Whether to allow sending to all users (the "user" group)
 24+$wgEmailPageToolboxLink = 'Send to email'; # Link title for toolbox link (set to "" to not have any link in toolbox)
 25+$wgEmailPageActionLink = 'email'; # Link title for action link (set to "" to not have any action link)
 26+$wgPhpMailerClass = dirname(__FILE__).'/phpMailer_v2.1/class.phpmailer.php'; # From http://phpmailer.sourceforge.net/
 27+
 28+if ($wgEmailPageGroup) $wgGroupPermissions['sysop'][$wgEmailPageGroup] = true;
 29+
 30+$dir = dirname(__FILE__) . '/';
 31+$wgAutoloadClasses['SpecialEmailPage'] = $dir . 'EmailPage_body.php';
 32+$wgExtensionMessagesFiles['EmailPage'] = $dir . 'EmailPage.i18n.php';
 33+$wgExtensionAliasesFiles['EmailPage'] = $dir . 'EmailPage.alias.php';
 34+$wgSpecialPages['EmailPage'] = 'SpecialEmailPage';
 35+
 36+$wgExtensionCredits['specialpage'][] = array(
 37+ 'name' => 'Special:EmailPage',
 38+ 'author' => '[http://www.organicdesign.co.nz/nad User:Nad]',
 39+ 'description' => 'Send rendered HTML page to an email address or list of addresses using [http://phpmailer.sourceforge.net phpmailer].',
 40+ 'descriptionmsg' => 'ea-desc',
 41+ 'url' => 'http://www.mediawiki.org/wiki/Extension:EmailPage',
 42+ 'version' => EMAILPAGE_VERSION
 43+);
 44+
 45+# If form has been posted, include the phpmailer class
 46+if (isset($_REQUEST['ea-send'])) require_once($wgPhpMailerClass);
 47+
 48+# Add toolbox and action links
 49+if ($wgEmailPageToolboxLink) {
 50+ $wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfEmailPageToolboxLink';
 51+}
 52+
 53+if ($wgEmailPageActionLink) {
 54+ $wgHooks['SkinTemplateTabs'][] = 'wfEmailPageActionLink';
 55+}
 56+
 57+function wfEmailPageToolboxLink() {
 58+ global $wgEmailPageToolboxLink,$wgTitle;
 59+ if (is_object($wgTitle)) {
 60+ $url = Title::makeTitle(NS_SPECIAL,'EmailPage')->getLocalURL('ea-title='.$wgTitle->getPrefixedText());
 61+ echo("<li><a href=\"$url\">$wgEmailPageToolboxLink</li>");
 62+ }
 63+ return true;
 64+}
 65+
 66+
 67+function wfEmailPageActionLink(&$skin,&$actions) {
 68+ global $wgEmailPageActionLink,$wgTitle;
 69+ if (is_object($wgTitle)) {
 70+ $url = Title::makeTitle(NS_SPECIAL,'EmailPage')->getLocalURL('ea-title='.$wgTitle->getPrefixedText());
 71+ $actions['email'] = array('text' => $wgEmailPageActionLink, 'class' => false, 'href' => $url);
 72+ }
 73+ return true;
 74+}
Property changes on: trunk/extensions/EmailPage/EmailPage.php
___________________________________________________________________
Added: svn:mergeinfo
Added: svn:eol-style
175 + native
Property changes on: trunk/extensions/EmailPage
___________________________________________________________________
Added: svn:mergeinfo
Index: trunk/extensions/Translate/groups/mediawiki-defines.txt
@@ -210,7 +210,7 @@
211211
212212 Email Address Image
213213
214 -Email Article
 214+Email Page
215215 descmsg = ea-desc
216216
217217 Error Handler
Index: trunk/extensions/Translate/aliases.txt
@@ -34,8 +34,8 @@
3535 Edit user
3636 file = EditUser/EditUser.alias.php
3737
38 -Email article
39 -file = EmailArticle/EmailArticle.alias.php
 38+Email page
 39+file = EmailPage/EmailPage.alias.php
4040
4141 Eval
4242 file = Eval/SpecialEval.alias.php

Follow-up revisions

RevisionCommit summaryAuthorDate
r37726Revert r37619, 37620 -- creates fatal PHP parse errors in at least class.pop3...brion22:07, 15 July 2008
r37727Recommit r37619, 37620 in 2 goes, without phpMailer update....siebrand22:11, 15 July 2008
r37728Recommit r37619, 37620 in <s>2</s> 3 goes, without phpMailer update....siebrand22:13, 15 July 2008
r37729Recommit r37619, 37620 in <s>2</s> 3 goes, without phpMailer update....siebrand22:27, 15 July 2008

Status & tagging log