In this article, I will show you how we can setup Godaddy SMTP settings in Laravel, If you are using mailtrap or sendgrid to send email from your Laravel Application Via Godaddy Server, you are unable to send.
As godaddy shared hosting doesn’t allow you to send mail via mailtrap or sendgrid or other mail services, you always get error in case of using other mail services.
To setup smtp settings in Laravel on Godaddy in shared hosting follow the below setup.
- Login into your GoDaddy account
- Go to your admin panel
- Create a mail with your domain name
- Go to your laravel .env file setup the smtp settings
Log in to your GoDaddy account
First, you have to log in to the GoDaddy account, then go to your products, click on manage, then you have something like the below image.
Go to your cPanel Admin
Now click on cPanel Admin and look for the email, in email section you have to create one email, that we will use in our .env file to send email from the laravel application.
When you search for the email then you have something like the below image.
Create email account with your domain name.
when you click on the email account, then you have something like the below image,click on the create to create a new mail account.
when you click create then you have something like the below image.
Here you have to enter all details to create a email account associated with your domain name.
Go to your .env file and add smtp details.
Now it’s time to setup your .env file so that you send mail direct from your application.
Go to .env file and add the below smtp details.
MAIL_DRIVER=smtp MAIL_HOST=localhost MAIL_PORT=25 MAIL_USERNAMEfirstname.lastname@example.org MAIL_PASSWORD=yourpassword MAIL_ENCRYPTION= MAIL_FROM_ADDRESSemail@example.com MAIL_FROM_NAME="mail name"
Read Also: How to add free ssl on godaddy
Read Also: Deploy Laravel 8 on godaddy
I hope the above article will help you to setup SMTP setting laravel on GoDaddy.