Fix Laravel Failed To Authenticate On Smtp Server With Username Mail Error On Cpanel - FreeCodeBlog

Last updated: Dec 16, 2021

Still using laravel on cpanel with mail connection? Yes. Did you get it error message like failed to authenticate on smtp server with username on cpanel? Yes. Actually This is a mail error that you have connected on cpanel with laravel website. You will see a 500 error when you try to send an email from laravel website using cpanel email account If you have closed (false) the app debug from the laravel env file when it is on cpanel otherwise you will see failed to authenticate on smtp server with username “cpanel-email” using 2 possible authenticators  error directly. So let's start to fix this error from cpanel as soon as possible.

 

Fix Laravel Failed To Authenticate On Smtp Server With Username Mail Error On Cpanel
Fix Laravel Failed To Authenticate On Smtp Server With Username Mail Error On Cpanel

 

1. That's The Error I Got.

I got error message from laravel website like "Failed to authenticate on SMTP server with username 'cpanel-email' using 2 possible authenticators and  Authenticator LOGIN returned Expected response code 235 but got code '535', with message "535 Incorrect authentication data' and  Authenticator PLAIN returned Expected response code 235 but got code '535', with message ‘535 Incorrect authentication data’ " When I tried to send an user email verification notification using cpanel email account information.

 

2. That Error Needs To Be Corrected.

If you got laravel error message like “Failed to authenticate on SMTP server with username ‘cpanel-email’” from your website that you stored on cpanel and connected cpanel mail account information in stored laravel website then you need to change mail account information from laravel website. You may need to change the password for the cpanel email account to resolve the SMTP server error. If the changed password does not work to resolve the cpanel SMTP server error then you may need to use the newly created email account information in the laravel .env file. You can delete the old email account if the newly created email account information works perfectly for resolving the cpanel SMTP error. Now let's follow next step to fix  “Failed to authenticate on SMTP server with username ‘cpanel-email’” error using changed cpanel email account's password.

 

3. Change Email Password.

Do you have a created email account in cpanel? Yes. Still used create cpanel email account information on laravel website? Yes. Okay now you need to change the password of the email account created from cpanel and reconnect mail configuration in laravel website again to fix "Failed to authenticate on SMTP server with username ‘cpanel-email’" error message. This cpanel SMTP server error should be resolved after using the changed email account information in the laravel .env file. You should follow step 4 if changed password not will work to solve “Failed to authenticate on SMTP cpanel” error.

 

4. Remove Cache.

Have you followed steps 3 and 5 to fix laravel email SMTP cpanel error? Yes. Listen, Sometimes Laravel stores some cache in the Laravel storage folder from local or liver server. So you should remove cache from laravel website, Whenever you change laravel env or config files from cpanel file manager folder. You can easily remove cache from laravel website using cpanel terminal or laravel web route. It's really easy task to solve laravel cpanel email SMTP error.

 

 php artisan config:cache
 php artisan cache:clear

 

5. Create Email Account.

Still getting the same error on the Laravel website? Yes. OK, let's create a new email account from cpanel and configure new created email in laravel .env file again. Don't know how to create cpanel email account to fix failed to authenticate on smtp server error for laravel website? No. Don't worry just read how to create an email account from cpanel slowly.  I hope the cpanel SMTP server error goes away after implement the new email configuration in the laravel .env file. Just don't forget to use correct email information on laravel website. Did you use cpanel email account information correctly in the laravel .env file? Yes. Still facing same SMTP server with username error on cpanel for laravel website? Yes. Okay now you need to follow step 4 to fix this cpanel SMTP server error problem.

 

6. Delete Email Account.

Did you use the new cpanel email account information in the laravel .env file from the cpanel file manager? Yes. If new account information will help you to solve Failed to authenticate on SMTP server with username problem then you should remove some unnecessary emails from old email account. Now try again to reconnect old email account on laravel website. If the problem will fix using old email account information then congratulations otherwise you may delete old email account. Please don't forget follow step 4 after reconnect old cpanel email account info in the laravel .env file again to fix cpanel SMTP server error.

 

Okay so this is for today. See you again next tutorials. Thanks

Post Tags
Post Writer
masum7323
Masum Biswas (@masum7323)

My name is Masum Biswas. I'm a full stack developer. I live in Bangladesh and I love to write tutorials and tools that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, MySQL, VueJS, Tailwind CSS and Bootstrap from the early stage.

Follow Me On
Related Posts
Laravel Ui Email Verification Complete Tutorial

Want to make laravel ui vue, react, bootstrap email verification using laravel ui version 3, 2, 1? Laravel ui has a feature for users to verify ema... Read More

How To Configure Laravel Project For Production

Want to deploy laravel project on live server, shared hosting, vps server, production? Wait a minute, have you configured the Laravel project for p... Read More

Show And Hide Password In Laravel Vue

make show and hide password in laravel vue using laravel ui package. Sometimes, we may require to show hide password input field so, user can see w... Read More

All About Laravel View Controller And Route

Want to make a laravel project? You need to know about laravel view, controller and route to create a laravel project. You can create a laravel pro... Read More

Upload Laravel Project To Shared Hosting Using Public Github Repository

Want to use GitHub public repository to upload laravel project to shared hosting cpanel? Public GitHub repository for laravel project uploading on... Read More