Hi I am learning to do things more object oriented, and have a question.
Look at the Class below, ok it is a v 0.0.1 of a sendmail class but how do I get the class to return a message when the mail is sent.
thanks in advance, Thomas
eg.
$foo = new MyMail;
$foo->to = "";
$foo->from = "";
...
$foo->sendMail();
<?
class MyMail {
var $to;
var $from;
var $subject;
var $body;
function sendMail() {
mail("".$this->to."","".$this->subject."","".$this->body."", "From:".$this->from."\n\r");
}
}
?>