Beispiel #1
0
Datei: Mail.php Projekt: rjha/sc
 /**
  * @return code - returned from sendgrid mail wrapper. 
  * A non zero code indicate failure, zero means success 
  *
  */
 static function sendActivityMail($name, $email, $feedText, $feedHtml)
 {
     $templates = \com\indigloo\sc\html\Mail::getActivity($name, $feedText, $feedHtml);
     //get new text and html now.
     $text = $templates["text"];
     $html = $templates["html"];
     // According to mail chimp research - mail  subject
     // should be 50 chars or less
     // However we need to send long post titles in subject.
     $subject = Util::abbreviate("3mik.com - " . $feedText, 100);
     $subject .= "...";
     $from = Config::getInstance()->get_value("default.mail.address");
     $fromName = Config::getInstance()->get_value("default.mail.name");
     $tos = array($email);
     $code = \com\indigloo\mail\SendGrid::sendViaWeb($tos, $from, $fromName, $subject, $text, $html);
     return $code;
 }