/** * @param array $recipient Recipient e-mail address * @param string $subject E-mail subject * @param string $body Message body * @param bool $html - HTML mail or plain text * @param array $replyto Reply to email address * @param array $cc CC e-mail address * @param array $bcc BCC e-mail address * @param string $attachment Attachment file name * @param array $cert - pem certificate * @param array $from - array( from, fromname ) * @internal param array $replytoname Reply to name * @return boolean True on success */ public static function SpSendMail($recipient, $subject, $body, $html = false, $replyto = null, $cc = null, $bcc = null, $attachment = null, $cert = null, $from = null) { $from = is_array($from) ? $from : array(Sobi::Cfg('mail.from'), Sobi::Cfg('mail.fromname')); $mail = new self(); $mail->setSender($from); $mail->setSubject($subject); $mail->setBody($body); if ($html) { $mail->IsHTML(true); } if ($cert) { $mail->Sign($cert['certificate'], $cert['key'], $cert['password']); } $mail->addRecipient($recipient); $mail->addCC($cc); $mail->addBCC($bcc); $mail->addAttachment($attachment); $mail->addReplyTo($replyto); return $mail->Send(); }