Error while sending email on GoDaddy Server: Laravel 5.1

前端 未结 6 1986
借酒劲吻你
借酒劲吻你 2020-12-17 03:50

I am using inbuilt template of Login System in Laravel 5.1

When I use Forgot Password on localhost, everything works. Below are my keys in .env file<

6条回答
  •  情话喂你
    2020-12-17 04:39

    Your env file must be like below

    MAIL_DRIVER=smtp
    MAIL_HOST=localhost
    MAIL_PORT=465
    MAIL_USERNAME=
    MAIL_PASSWORD=
    MAIL_ENCRYPTION=ssl
    

    In your config/mail.php, the from value should be like below...

    'from' => ['address' => 'pankaj@YourDomainName.com', 'name' => 'Sender Name'],
    

    What's your domain Name in from ? or you can say, How to create Email account in GoDaddy ?

    1. Login in your GoDaddy Account
    2. Go to your Hosting Account.
    3. Click Manage
    4. Under Email category, Please click Accounts
    5. Create an account if there is no email account.

    and that's it.

    So let's say you have email address like Pankaj@yourdomainname.com

    Now, put this email address in config/mail.php for from field. That's it.

    This will 100% fix the issue

提交回复
热议问题