C_mailer

C_mailer API reference

Package: PHPMailer

Extends: PHPMailer

File: tce_class_mailer.php line 42

Tags

  • class: C_mailer PHPMailer class extension.
  • author: Nicola Asuni
  • since: 2005-02-24

Methods

setConfigData()

File: tce_class_mailer.php line 67

public setConfigData(array<string|int, mixed> $emailcfg[, string $charset = '' ]) : void

The configuration comes from a plain PHP config file, so every value is untyped as far as static analysis is concerned: cast each one to the type PHPMailer declares for the matching property. The charset falls back to the configured default when the language has none.

Parameters

  • $emailcfg : array<string|int, mixed>: TCExam email configuration array.
  • $charset : string = ‘’: Language charset, overrides the configured one when not empty.

Tags

  • public

setError()

File: tce_class_mailer.php line 49

public setError(mixed $msg) : mixed

Parameters

  • $msg : mixed: (string) error message

Tags

  • public

setLanguageData()

File: tce_class_mailer.php line 112

public setLanguageData(mixed $lang) : mixed

PHPMailer 7 resolves its error messages through the static self::lang()/self::$language mechanism (lang() is no longer an overridable instance method, and is always called as self::lang() internally). So instead of overriding lang(), the TCExam translations are merged onto PHPMailer’s own language keys: a TMX entry “m_mailerror_” overrides PHPMailer’s "" message. English defaults are loaded first so any key TCExam does not translate still resolves.

Parameters

  • $lang : mixed: (array) TCExam language array (the global $l).

Tags

  • public