You are here

public function PHPMailer::AddrFormat in SMTP Authentication Support 7.2

Same name and namespace in other branches
  1. 5 smtp.module \PHPMailer::AddrFormat()
  2. 7 smtp.phpmailer.inc \PHPMailer::AddrFormat()

Formats an address correctly. @access public

Return value

string

3 calls to PHPMailer::AddrFormat()
PHPMailer::AddrAppend in ./smtp.phpmailer.inc
Creates recipient headers. @access public
PHPMailer::CreateHeader in ./smtp.phpmailer.inc
Assembles message header. @access public
PHPMailer::MailSend in ./smtp.phpmailer.inc
Sends mail using the PHP mail() function.

File

./smtp.phpmailer.inc, line 855
The mail handler class in smtp module, based on code of the phpmailer library, customized and relicensed to GPLv2.

Class

PHPMailer
PHPMailer - PHP email transport class NOTE: Requires PHP version 5 or later @package PHPMailer @author Andy Prevost @author Marcus Bointon @copyright 2004 - 2009 Andy Prevost

Code

public function AddrFormat($addr) {
  if (empty($addr[1])) {
    return $this
      ->SecureHeader($addr[0]);
  }
  else {
    return $this
      ->EncodeHeader($this
      ->SecureHeader($addr[1]), 'phrase') . " <" . $this
      ->SecureHeader($addr[0]) . ">";
  }
}