当前位置: 首页>>代码示例>>PHP>>正文


PHP Mail::raw方法代码示例

本文整理汇总了PHP中Illuminate\Support\Facades\Mail::raw方法的典型用法代码示例。如果您正苦于以下问题:PHP Mail::raw方法的具体用法?PHP Mail::raw怎么用?PHP Mail::raw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Support\Facades\Mail的用法示例。


在下文中一共展示了Mail::raw方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sendMail

 public function sendMail(UserMailer $mailer)
 {
     Mail::raw('Laravel with Mailgun is easy!', function ($message) {
         $message->to('kamausamuel11@gmail.com');
     });
     #$mailer->sendConfirmationMailTo($this->user(), str_random(60));
 }
开发者ID:Jemok,项目名称:skoolspace,代码行数:7,代码来源:HomeController.php

示例2: store

 public function store(Request $request)
 {
     //dd($request);
     $participante = Participant::find($request['id']);
     if ($participante != null) {
         return $this->alterRegister($request, $participante);
     } else {
         $this->validate($request, ['name' => 'required', 'cpf' => 'required|unique:participants', 'email' => 'required', 'phone' => 'required', 'address' => 'required', 'password' => 'required', 'type' => 'required|rparticipant']);
         if (Input::get('type') == "student") {
             $this->validate($request, ['university' => 'required', 'course' => 'required']);
         } else {
             if (Input::get('type') == "professor") {
                 $this->validate($request, ['university' => 'required', 'department' => 'required']);
             }
         }
         $inputParticipant = $request->all();
         //Participant::create($inputParticipant);
         //Não alterar - ainda que fora do padrão
         // =====================================================
         DB::table('participants')->insert(['name' => Input::get('name'), 'cpf' => Input::get('cpf'), 'email' => Input::get('email'), 'phone' => Input::get('phone'), 'address' => Input::get('address'), 'password' => bcrypt(Input::get('password')), 'type' => Input::get('type'), 'university' => Input::get('university'), 'course' => Input::get('course'), 'department' => Input::get('department'), 'responsability' => Input::get('responsability')]);
         // +++++++++++++++++++++++++++++++++++++++++++++++++++++
         Mail::raw('You have successfully created your account on CTFlor website', function ($message) {
             $message->to(Input::get('email'), Input::get('name'))->subject('CTFlor Website - Registration');
         });
         return redirect()->back()->with('info', 'Successfully created event!');
     }
 }
开发者ID:leloulight,项目名称:CTFlor,代码行数:27,代码来源:ParticipantController.php

示例3: create

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create(Request $request)
 {
     $token = str_random(32);
     $inputs = $request->all();
     $userId = Auth::user()->id;
     $vacancy = Page::where('userId', '=', $userId, 'and', 'status', '=', '1')->get();
     if (count($vacancy)) {
         Page::create(['userId' => $userId, 'title' => $inputs['title'], 'content' => $inputs['content'], 'email' => $inputs['email'], 'status' => 1, 'token' => $token]);
         return redirect('/')->with('message', 'Вакансия создана');
     } else {
         $text = 'Спасибо за размещение, в данный момент вакансия на модерации.';
         Mail::raw($text, function ($message) {
             $userEmail = Auth::user()->email;
             $message->from('laravel@example.com', 'Laravel');
             $message->to($userEmail);
         });
         Page::create(['userId' => $userId, 'title' => $inputs['title'], 'content' => $inputs['content'], 'email' => $inputs['email'], 'status' => 0, 'token' => $token]);
         Mail::send('emails.template', ['token' => $token, 'title' => $inputs['title'], 'content' => $inputs['content']], function ($message) {
             $userEmail = User::where('user_type', '=', 'admin')->first();
             $message->from('laravel@example.com', 'Laravel');
             $message->to($userEmail->email);
         });
         return redirect('/')->with('message', 'Проверьте почту');
     }
 }
开发者ID:AlexandrGitHub,项目名称:test,代码行数:30,代码来源:CreateItemController.php

示例4: handle

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $auctions = Auction::where('active', '=', true)->get();
     foreach ($auctions as $key => $auction) {
         if ($auction->end_date < Carbon::now() && $auction->active == true) {
             // auction end
             $auction->active = false;
             $auction->save();
             // highest bidder mail congrats
             $highestbid = Bid::where('auction_id', '=', $auction->id)->orderBy('price', 'desc')->first();
             $highestbiduser = User::where('id', '=', $highestbid->user_id)->first();
             $emailwon = $highestbiduser->login->email;
             Mail::raw('The auction ended, you bought the auction ' . $auction->title, function ($message) use($emailwon) {
                 $message->to($emailwon)->subject('The auction ended, you bought the auction ');
                 $message->from('admin@landorette.com');
             });
             // other bidders damn it mail
             $count = Bid::where('auction_id', '=', $auction->id)->count();
             $skip = 1;
             $limit = $count - $skip;
             // the limit
             $otherbids = Bid::where('auction_id', '=', $auction->id)->orderBy('price', 'desc')->skip($skip)->take($limit)->get();
             foreach ($otherbids as $key => $bid) {
                 $user = User::where('id', '=', $bid->user_id)->first();
                 $emaillose = $user->login->email;
                 Mail::raw('The auction ended, you lost the auction ' . $auction->title, function ($message) use($emaillose) {
                     $message->to($emaillose)->subject('The auction ended, you lost the auction ');
                     $message->from('admin@landorette.com');
                 });
             }
         }
     }
 }
开发者ID:davidcassedie,项目名称:webdev-opdracht2.int,代码行数:38,代码来源:endingAuctionCronJob.php

示例5: handle

 /**
  * Handle the event.
  *
  * @param  JobWasPosted  $event
  * @return void
  */
 public function handle(JobWasPosted $event)
 {
     //dd($event->jobs->title);
     Mail::raw('My message to ' . $event->jobs->title, function ($message) {
         $message->from('information@c21scheetz.com', 'C21 Scheetz');
         $message->to('joedelise@gmail.com');
     });
 }
开发者ID:jdelise,项目名称:career_site,代码行数:14,代码来源:EmailConfirmation.php

示例6: handle

 public function handle()
 {
     $data = $this->data;
     Mail::raw($data['message'], function ($message) use($data) {
         $message->from($data['email'], $data['name']);
         $message->to(env('MAIL_TO', 'ankitchadha@gmail.com'));
     });
 }
开发者ID:palhimanshu1991,项目名称:dastangoi,代码行数:8,代码来源:SendContactEmail.php

示例7: report

 /**
  * Report or log an exception.
  *
  * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
  *
  * @param \Exception $exception
  *
  * @return void
  */
 public function report(Exception $exception)
 {
     Mail::raw($exception, function ($message) {
         $message->subject(config('root.report.exceptions_subject'));
         $message->from(config('root.report.from_address'), config('root.appname'));
         $message->to(config('root.report.to_mail'));
     });
     return parent::report($exception);
 }
开发者ID:MHM5000,项目名称:timegrid,代码行数:18,代码来源:Handler.php

示例8: sendEmail

 public function sendEmail($username, Request $request)
 {
     $user = User::where('username', '=', $username)->first();
     Mail::raw($request->message, function ($m) use($user, $request) {
         $m->from($request->email, $request->name);
         $m->to($user->email, $user->name)->subject($request->subject);
     });
     return redirect()->back();
 }
开发者ID:otsaan,项目名称:e-blog,代码行数:9,代码来源:BlogController.php

示例9: contact

 public function contact()
 {
     if (Request::ajax()) {
         Mail::raw('name: ' . Request::get('name') . " \n Email: " . Request::get('email') . " \n Message: " . Request::get('message'), function ($message) {
             $message->from('hossamhazem94@gmail.com', 'My Website');
             $message->to('hossamhazem94@gmail.com');
         });
         return response(200);
     }
 }
开发者ID:Hossam-Hazem,项目名称:laravelsite,代码行数:10,代码来源:HomeController.php

示例10: handle

 /**
  * {@inheritdoc}
  */
 public function handle(array $data)
 {
     if (!Spark::hasSupportAddress()) {
         throw new RuntimeException("No customer support request recipient is defined.");
     }
     Mail::raw($data['message'], function ($m) use($data) {
         $m->to(Spark::supportAddress())->subject('Support Request: ' . $data['subject']);
         $m->replyTo($data['from']);
     });
 }
开发者ID:defenestrator,项目名称:groid,代码行数:13,代码来源:SendSupportEmail.php

示例11: emailOnlineNotify

 public function emailOnlineNotify($data)
 {
     $to = explode(',', Setting::get('email_on_to'));
     Mail::raw(Setting::get('email_on_message'), function ($message) use($to) {
         $message->from(Setting::get('email_from'), 'Pulse');
         $message->to($to);
         $message->subject(Setting::get('email_on_subject'));
     });
     DB::update("UPDATE statuses SET email_on_notified = 1 WHERE id = '" . $data['id'] . "'");
 }
开发者ID:maxiv,项目名称:router-pulse,代码行数:10,代码来源:Status.php

示例12: report

 /**
  * Report or log an exception.
  *
  * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
  *
  * @param  \Exception  $exception
  * @return void
  */
 public function report(Exception $exception)
 {
     if (env('APP_ENV', 'local') != 'local') {
         Mail::raw($exception, function ($message) {
             $message->subject('[ROOT] Exception Report');
             $message->from(env('MAIL_FROM_ADDRESS', 'root@localhost'), env('SYSLOG_APPNAME', ''));
             $message->to(env('ROOT_REPORT_MAIL', 'root@localhost'));
         });
     }
     return parent::report($exception);
 }
开发者ID:ancchaimongkon,项目名称:timegrid,代码行数:19,代码来源:Handler.php

示例13: sendMail

 public function sendMail(Request $request)
 {
     $this->validate($request, ['nome' => 'required|string|min:1', 'email' => 'required|email', 'mensagem' => 'required|min:10']);
     $nome = $request->input('nome');
     $email = $request->input('email');
     $mensagem = $request->input('mensagem');
     Mail::raw($mensagem, function ($message) use($email, $nome) {
         $message->from($email, $nome);
         $message->to('diego.dias@dfdias.com.br')->subject('Contato do site - ' . $email);
     });
     return redirect('/contato')->with('mensagem', 'Solicitação de contato enviada com sucesso.');
 }
开发者ID:abraaodwd,项目名称:DFDias,代码行数:12,代码来源:ContatoController.php

示例14: confirmquestion_send

 public function confirmquestion_send(Request $request)
 {
     if ($request->session()->has('contact')) {
         $contact = $request->session()->get('contact');
         Mail::raw($contact['0']['question'], function ($message) use($contact) {
             $message->to('proostcedric93@gmail.com')->subject($contact['0']['auction']->title);
             $message->from($contact['0']['email']);
         });
         return Redirect::route('welcome');
     } else {
         return view('contactconfirm');
     }
 }
开发者ID:davidcassedie,项目名称:webdev-opdracht2.int,代码行数:13,代码来源:HelpController.php

示例15: postIndex

 /**
  * Обработчик запроса на отправку сообщения
  *
  * @param ContactsMessageRequest $request
  * @return \Illuminate\Http\RedirectResponse
  */
 public function postIndex(ContactsMessageRequest $request)
 {
     // Отправляем сообщение на email
     $subject = 'Повідомлення користувача веб-сайту ' . url();
     Mail::raw(nl2br($request->get('message')), function ($message) use(&$request, &$subject) {
         $message->from($request->get('email'), $request->get('name'));
         $message->subject($subject);
         $message->to(Memory::get('site.email_to', 'llckadsgroup@gmail.com'));
     });
     if ($request->ajax()) {
         return response()->json(['success' => true]);
     } else {
         return redirect()->action('Marketing\\ContactsController@getIndex')->with('success', 'Спасибо, сообщение успешно отправлено. Наши менеджеры ответят на него в ближайшее время!');
     }
 }
开发者ID:alexmon1989,项目名称:kadsgroup,代码行数:21,代码来源:ContactsController.php


注:本文中的Illuminate\Support\Facades\Mail::raw方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。