You are here

function PHPMailer::GetBoundary in SMTP Authentication Support 5

Same name and namespace in other branches
  1. 7.2 smtp.phpmailer.inc \PHPMailer::GetBoundary()
  2. 7 smtp.phpmailer.inc \PHPMailer::GetBoundary()

Returns the start of a message boundary. @access private

1 call to PHPMailer::GetBoundary()
PHPMailer::CreateBody in ./smtp.module
Assembles the message body. Returns an empty string on failure. @access private

File

./smtp.module, line 1391
Enables drupal to send email directly to an SMTP server using authentication. Uses the PHPMailer class by Brent R. Matzelle.

Class

PHPMailer
PHPMailer - PHP email transport class @package PHPMailer @author Brent R. Matzelle @copyright 2001 - 2003 Brent R. Matzelle

Code

function GetBoundary($boundary, $charSet, $contentType, $encoding) {
  $result = "";
  if ($charSet == "") {
    $charSet = $this->CharSet;
  }
  if ($contentType == "") {
    $contentType = $this->ContentType;
  }
  if ($encoding == "") {
    $encoding = $this->Encoding;
  }
  $result .= $this
    ->TextLine("--" . $boundary);
  $result .= sprintf("Content-Type: %s; charset = \"%s\"", $contentType, $charSet);
  $result .= $this->LE;
  $result .= $this
    ->HeaderLine("Content-Transfer-Encoding", $encoding);
  $result .= $this->LE;
  return $result;
}