php Illuminate-Contracts-Mail-Mailer类(方法)实例源码

下面列出了php Illuminate-Contracts-Mail-Mailer 类(方法)源码代码实例,从而了解它的用法。

作者:doankho    项目:Applicatio   
/**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $data = ['title' => 'ChickenElectric-Xác nhận người dùng.', 'intro' => 'Cảm ơn bạn vì đã đăng ký làm thành viên của ChickenElectric. Chúng tôi sẽ gửi tới bạn các thông tin mới nhất về các bài viết. Để active tài khoản hãy truy cập vào đường link sau.', 'register_token' => $this->_user->register_token];
     $mailer->send('email.auth.verify', $data, function ($message) {
         $message->to($this->_user->email, 'doankhoi')->subject('ChickenElectric');
     });
 }

作者:BrantWladichu    项目:gamechalleng.e   
/**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $data = ['title' => $this->attempt->user->name . ' invited you to attempt the ' . $this->attempt->challenge->title . ' challenge.', 'name' => $this->user->name, 'email' => $this->user->email, 'content' => null, 'url' => 'https://gamechalleng.es/notifications', 'url_text' => 'View Notifications'];
     $mailer->send('emails.transactional', $data, function ($m) use($data) {
         $m->to($data['email'], $data['name'])->subject($data['title']);
     });
 }

作者:cawakharko    项目:laravel-sende   
/**
  * Execute the job.
  *
  * @param  Mailer $mailer
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     echo 'Sending email.' . PHP_EOL;
     if ($this->attempts() > 1) {
         $this->delete();
     }
     $users = $this->getUsers($this->dir . '/userlist.xlsx');
     $html = file_get_contents($this->dir . '/email.html');
     foreach ($users as $index => $user) {
         $index++;
         if (!filter_var($user, FILTER_VALIDATE_EMAIL)) {
             continue;
         }
         $mailer->send('laravel-sender::email.html', ['html' => $html], function ($m) use($user) {
             $m->from($this->from, $this->fromTitle);
             $m->to($user, null)->subject($this->title);
         });
         var_dump($user);
         if ($index % 10 === 0) {
             sleep(5);
         }
     }
     /*
      */
     echo 'end.' . PHP_EOL;
     $this->delete();
 }

作者:suchay    项目:easymanag   
/**
  * Execute the job.
  *
  * @param Mailer $mailer
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $mailer->send('emails.verify', [], function ($message) {
         $message->from(env('MAIL_FROM'), 'Easymanage.in');
         $message->to($this->emailAddress)->subject('Please Verify Your Easymanage.in Account');
     });
 }

作者:hisambaha    项目:DARE   
/**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $teachers = $this->teachers;
     foreach ($teachers as $teacher) {
         $message = new TeacherMessage();
         $message->sender_id = $this->sender_id;
         $message->email = $this->email;
         $message->sms = $this->sms;
         $message->teacher_id = $teacher->id;
         $data = ['content' => $this->email];
         $attachments = $this->attachments;
         if ($this->email) {
             $mailer->send('teachers::emails.message', $data, function ($m) use($teacher, $attachments) {
                 $m->to($teacher->email, $teacher->name)->from(config('teachers.from_email'))->subject("subject");
                 if (!empty($attachments)) {
                     foreach ($attachments as $a) {
                         $m->attach($a);
                     }
                 }
             });
             $message->email_sent = 1;
         }
         if ($this->sms) {
             $sms = new SmsGateway($this->sms, [$teacher->mobile]);
             $result = $sms->send();
             if ($result->getPushMessageResult()->PushMessageResult == 1) {
                 $message->sms_sent = 1;
             }
         }
         $message->save();
     }
     event(new TeachersMessagesQueueFinished());
 }

作者:malezh    项目:message-sende   
/**
  * Handler
  *
  * @param \Illuminate\Contracts\Mail\Mailer $mailer
  * @param \Illuminate\Contracts\View\Factory $view
  * @param \Illuminate\Contracts\Validation\Factory $validator
  * @throws \Exception
  * @return void
  */
 public function handle(Mailer $mailer, Factory $view, Validator $validator)
 {
     $queue = $this->messageQueue;
     $queue->status = 'in_processes';
     $queue->save();
     $queue->load('event', 'event.template');
     $parameters = array_merge_recursive($queue->event->template->parameters, $queue->event->parameters, $queue->parameters);
     $messageParameters = array_dot($this->getMessageParameters($validator, $parameters['message']));
     $renderView = $queue->event->template->getRender($parameters['view']);
     $mailer->send('message-sender::providers.plain', ['content' => $renderView], function ($message) use($parameters, $messageParameters) {
         $message->from($messageParameters['from.address'], $messageParameters['from.name']);
         $message->to($messageParameters['to.address'], $messageParameters['from.name']);
         $message->subject($parameters['provider']['subject']);
         if (isset($parameters['provider']['headers'])) {
             $mailHeaders = $message->getSwiftMessage()->getHeaders();
             foreach ($parameters['provider']['headers'] as $header) {
                 $mailHeaders->addTextHeader($header['name'], $header['value']);
             }
         }
     });
     if (count($mailer->failures()) > 0) {
         throw new \Exception('Mail send failed.');
     } else {
         $queue->status = 'sent';
         $queue->save();
     }
 }

作者:vishnu-    项目:invit   
/**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $mailer->send('emails.invite', ['email' => $this->auth_user_email, 'name' => $this->auth_user_name], function ($message) {
         $message->from($this->auth_user_email, $this->auth_user_name);
         $message->to($this->email)->subject('Invite to join Invite');
     });
 }

作者:abad    项目:websho   
/**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $this->inscription->load('colloque');
     $annexes = $this->inscription->colloque->annexe;
     // Generate annexes if any
     if (empty($this->inscription->documents) && !empty($annexes)) {
         $this->generator->setInscription($this->inscription)->generate($annexes);
     }
     $date = \Carbon\Carbon::now()->formatLocalized('%d %B %Y');
     $title = 'Votre inscription sur publications-droit.ch';
     $logo = 'facdroit.png';
     $user = $this->inscription->user;
     $annexes = $this->inscription->documents;
     $data = ['title' => $title, 'logo' => $logo, 'concerne' => 'Inscription', 'annexes' => $this->inscription->colloque->annexe, 'inscription' => $this->inscription, 'date' => $date];
     $mailer->send('emails.colloque.confirmation', $data, function ($message) use($user, $annexes) {
         $email = $this->email ? $this->email : $user->email;
         $message->to($email, $user->name)->subject('Confirmation d\'inscription');
         if (!empty($annexes)) {
             foreach ($annexes as $annexe) {
                 $message->attach($annexe['file'], array('as' => $annexe['name'], 'mime' => 'application/pdf'));
             }
         }
     });
     $this->inscription->send_at = date('Y-m-d');
     $this->inscription->save();
 }

作者:jhuhandh    项目:lblo   
/**
  * Execute the job.
  *
  * @param  Mailer  $mailer
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $data = ['title' => trans('front/verify.email-title'), 'intro' => trans('front/verify.email-intro'), 'link' => trans('front/verify.email-link'), 'confirmation_code' => $this->user->confirmation_code];
     $mailer->send('emails.auth.verify', $data, function ($message) {
         $message->to($this->user->email, $this->user->username)->subject(trans('front/verify.email-title'));
     });
 }

作者:lelouligh    项目:laravel_lates   
/**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $mailer->send('emails.reminder', ['user' => $this->user], function ($m) {
         //
     });
     //$this->user->reminders()->create(...);
 }

作者:adrianic    项目:IguanaTri   
/**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $data = ['title' => trans('front/verify.ReviewEmail'), 'intro' => trans('front/verify.email-intro'), 'link' => trans('front/verify.email-link'), 'confirmation_code' => $this->reviewU->confirmation_rev_code];
     $mailer->send('emails.auth.VerifyReview', $data, function ($message) {
         $message->to($this->reviewU->email_reviewer, $this->reviewU->nombre_reviewer)->subject("Review Verify iWaNaTrip.com");
     });
 }

作者:adrianic    项目:IguanaTri   
/**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $data = ['title' => "Invitación iWaNaTrip.com", 'nombrede' => $this->invitacion->invitacion_de, 'nombrepara' => $this->invitacion->invitacion_para];
     $mailer->send('emails.auth.inviteFriend', $data, function ($message) {
         $message->to($this->invitacion->correo, $this->invitacion->invitacion_para)->subject("Invitación iWaNaTrip.com");
     });
 }

作者:dingjc8    项目:larave   
/**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $mailer->send('emails.mailer', ['user' => $this->user], function ($m) {
         $m->from('jiacai.ding@shinsoft.net');
         $m->to('dingjc89@126.com');
     });
 }

作者:natsu9    项目:whatscarrier-ap   
/**
  * Execute the job.
  *
  * @param  Mailer  $mailer
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $mailer->raw('You have received a new purchase of ' . $this->receipt->product->credits . ' credits for ' . $this->receipt->price, function ($message) {
         $message->from('billing@whatscarrier.com', 'Whatscarrier');
         $message->subject('You have received new purchase')->to('mohd.sulaiman@sudirman.info');
     });
 }

作者:liubo205    项目:test-lazad   
/**
  * Execute the job.
  *
  * @param  Mailer  $mailer
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $message = $this->message;
     return $mailer->send('emails.reminder', [], function ($m) use($message) {
         $m->to('lazada_test@yopmail.com', 'Lazada Reporter')->sender('lazada_test@yopmail.com', 'Lazada Operator')->subject($message);
     });
 }

作者:RichNwankw    项目:richnwa   
/**
  * Execute the job.
  *
  * @param Mailer $mailer
  */
 public function handle(Mailer $mailer)
 {
     $emailData = ['name' => $this->name, 'email' => $this->email, 'message' => $this->message];
     $mailer->send('emails.contact', ['contactData' => $emailData], function ($mail) {
         // Create the message
         $mail->from('richnwan@gmail.com', 'Portfolio Site')->to('richnwan@gmail.com', 'Richard Nwankwo')->subject('You\'ve been contacted!');
     });
 }

作者:woolensculptur    项目:puls   
public function submit(Mailer $mailer, AskDestlerRequest $request)
 {
     $askdestlerRecipient = app('config')['witr.askdestler_recipient'];
     $mailer->send('emails.askdestler', $request->all(), function ($message) use($askdestlerRecipient) {
         $message->to($askdestlerRecipient['email'], $askdestlerRecipient['name'])->subject('WITR Ask Destler Submission');
     });
     return redirect()->route('askdestler')->with('success', 'Question Submitted!');
 }

作者:dirtyblanket    项目:allaccessrm   
public function handle(Mailer $mailer)
 {
     $email_data = array('name' => $this->attendee->firstname . ' ' . $this->attendee->lastname, 'event' => $this->attendee->event()->first()->title, 'payment' => $this->attendee->amount_paid);
     $mailer->send('emails.invoice', $email_data, function ($m) {
         $m->from('administrator@allaccess.dev', 'All Access RMS');
         $m->to('kapchoi@yahoo.com')->subject('Welcome to AllAccessRMS!');
     });
 }

作者:khanhpn    项目:hocve   
/**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $email = $this->email;
     $data = '';
     $mailer->send('emails.newsletter.latest', ['variable' => $data], function ($message) use($email) {
         $message->subject('Nh?ng bài vi?t quan tâm!')->from('phamngockhanh262@gmail.com', 'Admin http:://hoc.vet')->to($email, '');
     });
 }

作者:aniljaiswa    项目:mrswitc   
/**
  * Execute the job.
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $mailer->send('emails.contact', $this->details, function ($message) {
         $message->from($this->details['email'], $this->details['name']);
         $message->subject('MrSwitch Contact Form - Entry');
         $message->to("hello@mrswitch.zendesk.com");
     });
 }


问题


面经


文章

微信
公众号

扫码关注公众号