• Register
0 votes
2.3k views

Problem :

I got stuck on below error I am trying to configure my SMTP mail on laravel

Expected response code 250 but got code "530", with message "530 5.7.1 authentication required "

Below is the configuration on .env

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=fff3c01db52ee0
MAIL_PASSWORD=feaeda91dc9ab6
MAIL_ENCRYPTION=TLS

I have tried to authenticate my SMTP on the env but I keep facing the above error so for now I am stuck on that error.

7 5 2
3,870 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

Your mail.php on the config you have declared the host as smtp.mailgun.org and the port is 587 while on the env is different. So you need to change the mail.php as shown below:

'host' => env('MAIL_HOST', 'mailtrap.io'),

'port' => env('MAIL_PORT', 2525),

if you want to use the mailtrap. Then run below command

php artisan config:cache

OR

I can see that you have all the settings right. You just need to end your local web server and start it again with the below command

php artisan serve

Every time you change the .env file, you just need to restart your server for your new options to start taking effect.

Or just clear and cache the configuration with below command.

php artisan config:cache

I hope the above solutions will help you.

9 7 4
38,600 points

Related questions

0 votes
1 answer 307 views
307 views
Problem : I am trying to learn the pSQL. I recently moved my Laravel App from the MySQL to pSQL. But now I keep on getting below error. “The Response content must be a string or object implementing __toString(), "boolean" given.” I have the API that was returning my promotion before but now it only returns the above error. Can anyone suggest me solution on above error ?
asked Feb 13, 2020 mphil 2.3k points
0 votes
2 answers 333 views
333 views
Problem : I am facing following error while trying to login from the form: Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException No message The following is my route: Route::get('/', ['as' => '/', 'uses' => 'LoginController@getLogin']); Route::get('/login', ... ']); }); The following is form tag: <form class="login-form" action="{{ route('login') }}" method="post">
asked Dec 3, 2019 alecxe 7.5k points
0 votes
1 answer 350 views
350 views
Problem : I am currently using the Mac OS Yosemite and Laravel 5.0. I am new to Laravel 5.0. In the local environment whenever I run the below command php artisan migrate I always encounter below error : &ldquo;Access denied for user 'homestead'@'localhost' (using password: YES)&rdquo; I am unable to fix above error. Any clue to fix the above error?
asked Feb 13, 2020 mphil 2.3k points
0 votes
1 answer 53 views
53 views
Problem : Facing migration error on Laravel 5.4 with php artisan make:auth command as follows: syntax error or access violation: 1071 specified key was too long; max key length is 767 bytes
asked Nov 13, 2019 peterlaw 6.9k points
0 votes
1 answer 10 views
10 views
Problem: How to get rid of the error:failed opening required 'vendor/autoload.php'?
asked Dec 13, 2020 prog_learner 2.5k points
0 votes
2 answers 1.9K views
1.9K views
Problem : Currently I am using VueJS and Laravel for the project. Following issue started to show lately and it also comes up even in the old git branches. Unchecked runtime.lasterror: the message port closed before a response was received. This error only comes up in Chrome browser.
asked Dec 10, 2019 alecxe 7.5k points
1 vote
2 answers 429 views
429 views
My java program is running but the eclipse IDE crashes and shows the error message- &ldquo;Java was started but returned exit code=1&rdquo; I have set my environment variables correctly on my &ldquo;System Environment Variables&rdquo; settings. I have tried some other solutions found online but nothing worked for me unfortunately. Any help would be appreciated with thanks.
asked Mar 10, 2020 LizzyM 6.1k points
1 vote
1 answer 323 views
323 views
Problem: I am very new to Laravel. I have recently started leaning laravel. I am using the correct email address. I have already echoed it but if I try to send it then I face the below error: "Address in mailbox given [] does not comply with RFC 2822, 3 ... send('emails.activation', $data, function($message){ $message->to($email)->subject($subject); }); ->with('title', "Registered Successfully.");
asked Jun 5, 2020 Martin K 6.6k points