You are here

function DrupalPHPMailer::SetLanguage in PHPMailer 5

Same name and namespace in other branches
  1. 5.2 includes/phpmailer.class.inc \DrupalPHPMailer::SetLanguage()
  2. 6.3 includes/phpmailer.class.inc \DrupalPHPMailer::SetLanguage()
  3. 6 includes/phpmailer.inc \DrupalPHPMailer::SetLanguage()
  4. 6.2 includes/phpmailer.class.inc \DrupalPHPMailer::SetLanguage()
  5. 7.4 includes/phpmailer.class.inc \DrupalPHPMailer::SetLanguage()
  6. 7.3 includes/phpmailer.class.inc \DrupalPHPMailer::SetLanguage()

Sets the language for all class error messages.

Overrides PHPMailer::SetLanguage

File

includes/phpmailer.inc, line 45

Class

DrupalPHPMailer

Code

function SetLanguage($lang_type, $lang_path = null) {
  $PHPMAILER_LANG = array();
  $PHPMAILER_LANG["provide_address"] = t('You must provide at least one recipient email address.');
  $PHPMAILER_LANG["mailer_not_supported"] = t(' mailer is not supported.');
  $PHPMAILER_LANG["execute"] = t('Could not execute: ');
  $PHPMAILER_LANG["instantiate"] = t('Could not instantiate mail function.');
  $PHPMAILER_LANG["authenticate"] = t('SMTP Error: Could not authenticate.');
  $PHPMAILER_LANG["from_failed"] = t('The following From address failed: ');
  $PHPMAILER_LANG["recipients_failed"] = t('SMTP Error: The following recipients failed: ');
  $PHPMAILER_LANG["data_not_accepted"] = t('SMTP Error: Data not accepted.');
  $PHPMAILER_LANG["connect_host"] = t('SMTP Error: Could not connect to SMTP host.');
  $PHPMAILER_LANG["file_access"] = t('Could not access file: ');
  $PHPMAILER_LANG["file_open"] = t('File Error: Could not open file: ');
  $PHPMAILER_LANG["encoding"] = t('Unknown encoding: ');
  $this->language = $PHPMAILER_LANG;
  return true;
}