Example #1
0
 static function send($to, $subject, $msg, $attach = '', $attachFilename = '')
 {
     $e = new self();
     $e->setFrom(ini::get('email-address'), ini::get('email-name'));
     $e->setTo($to);
     $e->setSubject($subject);
     $e->setBody($msg);
     if (strlen($attach)) {
         $e->attach($attach, strlen($attachFilename) ? $attachFilename : 'attachment-1');
     }
     return $e->mail();
 }