Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'driver' => 'smtp',
- 'host' => 'smtp.gmail.com',
- 'port' => 587,
- 'from' => array('address' => 'postmaster@test.com', 'name' => 'Postmaster'),
- 'encryption' => 'tls',
- 'username' => 'xxx@gmail.com',
- 'password' => 'xxx',
- 'sendmail' => '/usr/sbin/sendmail -bs',
- 'pretend' => false,
- {{ Form::open(array('id'=>'mail-form', 'url'=>'en/mail', 'method' => 'post')) }}
- {{ Form::text('first_name', null , array('placeholder'=>Lang::get('quotation.first_name'), 'class'=>'text-input')) }}
- {{ Form::text('name', null , array('placeholder'=>Lang::get('quotation.name'), 'class'=>'text-input')) }}
- {{ Form::text('email', null , array('placeholder'=>Lang::get('quotation.email'), 'class'=>'text-input')) }}
- {{ Form::submit(Lang::get('quotation.send'), array('class'=>'submit-mail')) }}
- {{ Form::close() }}
- public function postMail(){
- $input = Input::all();
- $data = array(
- 'first_name' => $input['first_name'],
- 'name' => $input['name'],
- 'email' => $input['email'],
- );
- Mail::send('_emails.quotation', $data, function($message){
- $message->to($input['email'], $input['name'].' '.$input['first_name'])->subject('Test');
- });
- return Redirect::back();
- }
- Mail::send('_emails.quotation', ['data' => $data], function ($m) use ($data){
- $message->to($data->email, $data->name.' '.$data->first_name)->subject('Test');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement