I have problem with sending mails to log file. I checked similar topics here, but didnt find any solution.
When I fill up contact form and submit I get error
Swift_TransportException in AbstractSmtpTransport.php line 383: Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required "
My form.blade.php
{!! Form::open(array('route' => 'contact_store', 'class' => 'form')) !!}
<div class="form-group">
{!! Form::label('Your Name') !!}
{!! Form::text('name', null,
array('required',
'class'=>'form-control',
'placeholder'=>'Your name')) !!}
</div>
<div class="form-group">
{!! Form::label('Your E-mail Address') !!}
{!! Form::text('email', null,
array('required',
'class'=>'form-control',
'placeholder'=>'Your e-mail address')) !!}
</div>
<div class="form-group">
{!! Form::label('Your Message') !!}
{!! Form::textarea('message', null,
array('required',
'class'=>'form-control',
'placeholder'=>'Your message')) !!}
</div>
<div class="form-group">
{!! Form::submit('Contact Us!',
array('class'=>'btn btn-primary')) !!}
</div>{!! Form::close() !!}
ContactController.php function
public function store(ContactFormRequest $request) {
\Mail::raw ('test', function($message) {
$message->from('test@test.pl');
$message->to('test@test.com', 'Admin')->subject('TODOParrot Feedback');
});
return redirect('/contact')->with('message', 'Ok!');
}
mail.php setup
'driver' => env('MAIL_DRIVER', 'log'),
Did I missed some configuration? I have no idea.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire