You are here

public function DrupalPHPMailer::SetLanguage in PHPMailer 5.2

Same name and namespace in other branches
  1. 5 includes/phpmailer.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()

Provide more user-friendly error messages.

Note: messages should not end with a dot.

Overrides PHPMailer::SetLanguage

File

includes/phpmailer.class.inc, line 120

Class

DrupalPHPMailer
Base PHPMailer for Drupal implementation with support for SMTP keep-alive and setting a custom Return-Path.

Code

public function SetLanguage() {
  $this->language = array(
    'provide_address' => t('You must provide at least one recipient e-mail address'),
    'encoding' => t('Unknown encoding: '),
    'file_open' => t('Could not open file: '),
    'signing' => t('Signing error: '),
    'empty_message' => t('Message body empty'),
    'tls' => t('SMTP error: STARTTLS not accepted from server'),
    'authenticate' => t('SMTP error: could not authenticate'),
    'smtp_connect_failed' => t('SMTP error: could not connect to SMTP host'),
    'connect_host' => t('SMTP error: could not connect to SMTP host'),
    'from_failed' => t('The following sender address failed: '),
    // non-admin
    'recipients_failed' => t('The following recipient addresses failed: '),
    // non-admin
    'data_not_accepted' => t('SMTP error: data not accepted'),
    'smtp_error' => t('SMTP server error: '),
    // Unused messages.

    //'execute'           => t('Could not execute: '),

    //'instantiate'       => t('Could not instantiate mail() function.'),

    // Messages used during email generation.
    'file_access' => t('Could not access file: '),
    'invalid_address' => t('Invalid address'),
    'variable_set' => t('Cannot set or reset variable: '),
  );
  return TRUE;
}