You are here

function mime_mail::build_message in Backup and Migrate 7.2

Same name and namespace in other branches
  1. 8.2 includes/destinations.email.inc \mime_mail::build_message()
  2. 8.3 includes/destinations.email.inc \mime_mail::build_message()
  3. 6.3 includes/destinations.email.inc \mime_mail::build_message()
  4. 6.2 includes/destinations.email.inc \mime_mail::build_message()
  5. 7.3 includes/destinations.email.inc \mime_mail::build_message()
1 call to mime_mail::build_message()
mime_mail::build_multipart in includes/destinations.email.inc

File

includes/destinations.email.inc, line 115
Functions to handle the email backup destination.

Class

mime_mail

Code

function build_message($part) {
  $message = $part["message"];
  $message = chunk_split(base64_encode($message));
  $encoding = "base64";
  $disposition = $part['attach'] ? "Content-Disposition: attachment; filename={$part['name']}\n" : '';
  return "Content-Type: " . $part["ctype"] . ($part["name"] ? "; name = \"" . $part["name"] . "\"" : "") . "\nContent-Transfer-Encoding: {$encoding}\n{$disposition}\n{$message}\n";
}