Commit ba70e17ad9229c5dce111152eda2029fb82166ee

Authored by Neil Blakey-Milner
1 parent 219defba

Set phpmailer language (to English, for now), and return PEAR Error

instances instead of false.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3329 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 3 additions and 2 deletions
lib/email/Email.inc
... ... @@ -48,6 +48,7 @@ class Email {
48 48 $this->oMailer->FromName = (strlen($sFromName) == 0) ? $default->emailFromName : $sFromName;
49 49 $this->oMailer->WordWrap = 100;
50 50 $this->oMailer->IsHTML(true);
  51 + $this->oMailer->SetLanguage('en', KT_DIR . '/phpmailer/language/');
51 52 }
52 53  
53 54 /**
... ... @@ -102,14 +103,14 @@ class Email {
102 103 //send the email
103 104 if(!$this->oMailer->Send()) {
104 105 $default->log->error("Error sending mail to $mToEmail; mailer error code=" . $this->oMailer->ErrorInfo);
105   - return false;
  106 + return PEAR::raiseError("Error sending mail to $mToEmail; mailer error code=" . $this->oMailer->ErrorInfo);
106 107 } else {
107 108 $default->log->info("Successfully sent mail to $mToEmail");
108 109 }
109 110 return true;
110 111 } else {
111 112 // no valid email addresses supplied
112   - return false;
  113 + return PEAR::raiseError("No valid email addresses supplied");
113 114 }
114 115 }
115 116  
... ...