function mime_mail::send in Backup and Migrate 6.3
Same name and namespace in other branches
- 8.2 includes/destinations.email.inc \mime_mail::send()
- 8.3 includes/destinations.email.inc \mime_mail::send()
- 6.2 includes/destinations.email.inc \mime_mail::send()
- 7.3 includes/destinations.email.inc \mime_mail::send()
- 7.2 includes/destinations.email.inc \mime_mail::send()
File
- includes/
destinations.email.inc, line 132 - Functions to handle the email backup destination.
Class
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);
}