You are here

function mime_mail::send in Backup and Migrate 6.3

Same name and namespace in other branches
  1. 8.2 includes/destinations.email.inc \mime_mail::send()
  2. 8.3 includes/destinations.email.inc \mime_mail::send()
  3. 6.2 includes/destinations.email.inc \mime_mail::send()
  4. 7.3 includes/destinations.email.inc \mime_mail::send()
  5. 7.2 includes/destinations.email.inc \mime_mail::send()

File

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

Class

mime_mail

Code

function send() {
  $mime = "";
  if (!empty($this->from)) {
    $mime .= "From: " . $this->from . "\n";
  }
  if (!empty($this->headers)) {
    $mime .= $this->headers . "\n";
  }
  if (!empty($this->body)) {
    $this
      ->add_attachment($this->body, "", "text/plain");
  }
  $mime .= "MIME-Version: 1.0\n" . $this
    ->build_multipart();
  mail(trim($this->to), $this->subject, "", $mime);
}