SHARE
TWEET

Untitled

a guest Jul 11th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function contact_email(Request $request)
  2. {
  3.     $data['name'] = $request->name;
  4.     $data['email'] = $request->email;
  5.     $data['mobile'] = $request->mobile;
  6.     $data['message'] = $request->message;
  7.  
  8.     Mail::send('email-view', ['data' => $data], function ($message) {
  9.     $message->to(env('MAIL_USERNAME'))->subject('Contact Us Email Notification!!');
  10.     });
  11.     return redirect()->back();
  12. }
  13.      
  14. Mail::send('frontend.englishlistening.contact_reply', $data, function($message) use ($toEmail, $toName, $fromEmail, $fromName, $subject){
  15.  
  16.           $message->from($fromEmail, $fromName);
  17.           $message->to($toEmail, $toName);
  18.           $message->subject($subject);
  19.         });
  20.      
  21. dd(env('MAIL_USERNAME'))
  22.      
  23. Mail::send('email-view', $data, function ($message) {
  24.      $message->from('thesystem@mail.com', 'the name of your app');
  25.      $message->to('correct@email.com', 'This is a correct format')->subject('Example');
  26.  });
  27.      
  28. $data = $request->only('name', 'email', 'mobile', 'message') + ['to' => env('MAIL_USERNAME')];
  29.      
  30. public function contact_email(Request $request)
  31. {
  32.     $data = $request->only('name', 'email', 'mobile', 'message');
  33.  
  34.     Mail::send('email-view', $data, function ($message) use ($data) {
  35.         $message->from('thesystem@mail.com', 'the name of your app');
  36.         $message->to($data['email'], $data['name'])->subject('This is a way');
  37.     });
  38.  }
  39.      
  40. $data = $request->only('name', 'email', 'mobile', 'message');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top