Пример #1
0
 public function send()
 {
     $id = Input::get('id');
     $time = Input::get('time');
     $client = PersoaneFizice::find($id);
     $mailler = new \Mailers\Mailer();
     $mailler->sendTo($client->email, 'Clientul - ' . $client->nume . ' ' . $client->prenume, 'emails.scadenta.confirmare', ['body' => \View::make('emails.scadenta.email-content')->with(['client' => $client, 'time' => $time])->render(), 'client' => $client]);
     return ['message' => 'Email trimis cu succes'];
 }
Пример #2
0
 public static function sendEmail($client)
 {
     /**
      * Declansez evenimentul de trimitere email
      **/
     $mailler = new \Mailers\Mailer();
     $mailler->sendTo('*****@*****.**', 'Clientul - ' . $client->nume . ' ' . $client->prenume, 'emails.client.confirmare', ['body' => \View::make('extern.email-content')->with(['client' => $client])->render(), 'client' => $client]);
     /* \Event::fire('client.send-confirm-email', [
            'client'          => $client,
        ]);*/
     return ['success' => true];
 }
 /**
  * @param  $user
  * @return mixed
  */
 public function sendConfirmationEmail($user)
 {
     //$user can be user instance or id
     if (!$user instanceof User) {
         $user = User::findOrFail($user);
     }
     $mailler = new \Mailers\Mailer();
     $mailler->sendTo($user->email, 'Confirmare cont terenuripedia.ro', 'emails.confirmindex', ['body' => \View::make('emails.confirm')->with(['token' => $user->confirmation_code])->render()]);
     /* return Mail::send('emails.confirm', ['token' => $user->confirmation_code], function ($message) use ($user) {
            $message->to($user->email, $user->name)->subject(app_name() . ': Confirmare cont!');
        });*/
 }