Example #1
0
 static function compose($subject, $textbody, $to = null, $from = null)
 {
     $m = new self($subject, $textbody);
     if ($from) {
         $m->setFrom($from);
     }
     if ($to) {
         $m->addAddress($to);
     }
     return $m;
 }