コード例 #1
0
ファイル: firechat.php プロジェクト: vcorobceanu/WebAPL
 public function sendmail()
 {
     $id = \Input::get('id');
     $html = \Input::get('messages');
     $person = \PersonModel::find($id);
     if ($person) {
         $data['html'] = $html;
         Template::viewModule($this->module_name, function () use($data, $person) {
             \Mail::send('views.email-mess', $data, function ($message) use($person) {
                 $message->from("noreply@{$_SERVER['SERVER_NAME']}", 'WebLPA');
                 $message->subject("Discutie on-line din " . date("Y-m-d H:i"));
                 $message->to($person->email);
             });
         });
     }
 }