I am trying to send an email to a specific user by typing the URL, but I am getting the following error:
Swift_TransportException in AbstractSmtpTransport.php Line 383: expected response code 250 but the code "530" was found, with the message "530 5.7.1 authentication required
now So far, I'm trying to work with Gmail. How can I do this?
This is what I've done so far mail.php
& lt ;? php return ['driver' => env ('MAIL_DRIVER', 'smtp'), 'host' = & Gt; env ('MAIL_HOST', 'smtp.gmail.com'), 'Port' = & gt; env ('MAIL_PORT', 587), 'from' => ['address' = & gt; "MyUsername@gmail.com", 'name' = & gt; "example"], 'encryption' = & gt; TLS ',' Username '= & gt; env (' MyUsername@gmail.com '),' password '= & gt; env (' MyPassword '),' sendmail '= & gt;
This is in my way:
Route: / usr / sbin / Sendmail -bs', 'excuse' => : Get ('test', function () {mail :: send ('email.test', [], function ($ message) {$ message- & gt; to ('example@gmail.com ',' HisName ' ) - & gt; Topic ('Welcome to');}}};});
It is in my Controller:
Class Mail Controller Controller {Public Function Sending_Email () {$ this- & gt; call ('GET', 'Email.test'); Return View ('Email.test');}}
and it is in my .env file:
MAIL_DRIVER = smtp MAIL_HOST = smtp.gmail.com MAIL_PORT = 587 MAIL_USERNAME = MyUsername @ Gmail.com MAIL_PASSWORD = MyPassword
I know that it just works for you Is doing @ vththman 6 but this is what works for me if it is similar to someone else
I have added in my .env which gives the details of what I am using the mail service is. Then make sure that the following details
MAIL_DRIVER = smtp MAIL_HOST = smtp.gmail.com MAIL_PORT = 587 MAIL_USERNAME=MyUsername@gmail.com MAIL_PASSWORD = MyPassword
The .env file is accurate.
Note: Do not forget to restart your server after editing the .env file so that it can select the new data that you entered here.
If you do not restart your server, the ANI file will still continue to present old mail data in the app, even if you made a change which could cause this error is.
No comments:
Post a Comment