topical media & game development
basic-php-11-class.SimpleMail.php / php
<?php
class SimpleMail {
public cc = NULL;
public from = NULL;
public body = '';
public send_text = TRUE;
public message = '';
private to = NULL,
message = NULL,
this->to = this->subject = this->message = headers) {
headers;
}
} else {
if (this->headers .= "From: " . this->cc) {
this->cc . "\r\n";
}
if (this->headers .= "Bcc: " . this->send_text and !this->message = this->send_html and !this->message = this->headers .= "MIME-Version: 1.0\r\n";
_boundary = "==MP_Bound_xyccr948x==";
this->headers .= "Content-type: multipart/alternative; " .
"boundary=\"this->message = "This is a Multipart Message in " .
"MIME format\n";
_boundary\n";
this->message .= "Content-Transfer-Encoding: 7bit\n\n";
this->body . "\n";
_boundary\n";
this->message .= "Content-Transfer-Encoding: 7bit\n\n";
this->htmlbody . "\n";
_boundary--";
}
}
if (!mail(this->subject,this->headers)) {
throw new Exception('Sending mail failed.');
return FALSE;
} else {
return TRUE;
}
}
}
?>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.