Example #1
0
 public function sendLink($obj, $url, $fileName)
 {
     Trace::output($this->traceID, "sendLink");
     //----------------------------------------------------------
     //init var
     //----------------------------------------------------------
     $chk = array("bool" => true, "traceID" => "sendLink");
     //----------------------------------------------------------
     GlobalMas::$name = $obj['from'];
     //----------------------------------------------------------
     $message = $obj['from'] . " sent you a file!!!";
     //----------------------------------------------------------
     if ($obj['message'] != "") {
         $message .= "<br><br>" . $obj['message'];
     }
     $emailObj = array("emailTo" => $obj['email'], 'link' => $url, 'linkTxt' => $fileName, "message" => $message, "subject" => $subject = $obj['from'] . " sent you a file!!!");
     //----------------------------------------------------------
     if ($chk['bool']) {
         $chk = SendEmail_v0::sendDefault($emailObj);
     } else {
         return $chk;
     }
     //----------------------------------------------------------
     if ($chk['bool']) {
         $chk['message'] = "Email was successfully sent to " . $obj['email'];
     }
     //----------------------------------------------------------
     return $chk;
 }