Laravel 5.7 Email Verification Link Broken - laravel

At the moment I'm trying to implement the Laravel 5.7 email verification. I have got it so a mail driver will send an email out when registering a user. However, when I click on the email verify button, I get a 404 error.
The URL it sends me is this:
http://localhost/email/verify/16?expires=1543926629&signature=fa3a2a0d90c5752f99b24a7cf7c789edadba5aad2922fff907c289b3364ebceb
However, it is using the wrong URL as the local APP_URL in the regular .env is not localhost. Does anyone know how I can tell the email verification to use APP_URL instead of localhost? When I rename the URL to the correct URL, I can complete the email verification. Thanks.

Verify in your Http\Controllers\Auth\VerificationController.php if the protected attribute $redirectTo value exist in your routes\web.php or can be handled.

Related

email verification on laravel 7

I have a question, actually, I'm developing a web site using laravel 7 and I successfully make an email verification and password reset functionality using mailtrap.io; but all theses just in localhost, I'm wondering if there is any other way to use it in the production side because I want users to receive the email verification and password reset response on them's email not on mailtrap website.
here is an image shows the email verification and password reset response
enter image description here
You can use sendgrid.com for mail delivery.
Make sure you configure DNS correctly before using it and configure the White Label correctly for you Domain.
.env
MAIL_MAILER=smtp
MAIL_HOST=smtp.sendgrid.com
MAIL_PORT=465
MAIL_USERNAME=apikey
MAIL_PASSWORD=your_api_key_here
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=no-reply#yourdomain.com
MAIL_FROM_NAME="${APP_NAME}"

having issues on sending email in laravel 5.8

I am having issues on sending email via notification. I tried accessing the mailbox using the credentials I put in .env, the credential is good I am able to access the inbox but if I run the command sending email is failed.
on my .env
MAIL_DRIVER=smtp
MAIL_HOST=myhost
MAIL_PORT=465
MAIL_USERNAME=this#isworkingemail.com
MAIL_PASSWORD=pWdisWorking
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS=this#isworkingemail.com
MAIL_FROM_NAME='AFTSCredit'
my function via
public function via($notifiable)
{
return [TwilioChannel::class,'database','mail'];
// return [TwilioChannel::class,'database'];
}
any idea? plase help thank you in advance!
Your error says Authentication error. This is nothing to do with Laravel/PHP mailer.
Try one of these below:
Clear cache
Check if you have modified config file. Make sure your .env variables are being pointed in your config file
Check if your server allows outbound emails
Check if you have right credentials such as host name, username, password
If you need extra authentication to allow using smtp services like google. You will need to activate to allow to use less secure app.
Finally, but not the least
If your mail server password contains a # then you should quote the environment string since everything after # will be taken as comment (starting in Laravel 5.8)
put the port and host as follows
MAIL_PORT = 587
MAIL_HOST= smtp.gmail.com
and also in your gmail . Disable two authentication and enabled unsecured apps
and then it would be okkay

Failed to reset password laravel when it is uploaded in shared hosting

Reset password on my laravel project goes well with mailtrap while still using localhost, but when uploaded to shared hosting when click send password reset link appears message whoops, looks like something went wrong. Anyone has a solution for this? I use the laravel auth defaults
change the your MAIL_DRIVER=mail in your driver and set it to USERNAME and PASSWORD to null.
it will send the mails from your server.
I hope this helps

C-panel not sending Laravel mail

So I currently have setup my laravel project in C-panel, and have updated the .env file to have the appropriate email address. When I, for instance, use the make:auth reset password feature it responds with the appropriate "We have e-mailed your password reset link!", but there is no mail sent.
I am not sure how to test this to find the hole in the problem. When I used mailtrap I was able to send and receive emails no problem, but there is some issue with the webmail in c-panel not processing and sending out an email from Laravel 5.4
Help please
change your .env file. set MAIL_DRIVER=mail it will start working. make sure you set from in mail.php
`

Laravel's Mail notification won't send, but Laravel's Mail::Raw will

I have configured my SMTP server correctly in Laravel's env file, and can successfully send an email using Mail::raw e.g.
Mail::raw("This is a test message", function ($message)
{
$message->from(env("MAIL_ORDER_ADDRESS"), 'Orders');
$message->to('user#example.com');
$message->subject('Test Message');
});
However, when I use a laravel 5.3 mail notification, no email is received (nor is an error generated). I have tested the same notification code locally using mail trap and the notifications work correctly.
I can't understand how if the mail server is working and can be used with Mail::raw, it doesn't automatically work with notifications when I have tested locally and confirm they are coded correctly.
Note: Using shared hosting on NameCheap.
Any ideas?
FIXED: It was because I had not configured "From" in config/mail.php and because the domains didn't match, it wasn't set.
The opposite situation is occurring for me. I have the MAIL_DRIVER=mail set within the .env file.
I have set MAIL_FROM_ADDRESS & MAIL_FROM_NAME within the .env file and viewed the app/config/mail.php
Mail::raw is sending out email correctly via the Postfix logs but any emails sent via the new Laravel 5.3 Notifications is not working. No errors or any information writing to the logs.
There appears to be some other issue occurring.
I had the same issue. During testing for Mail::raw, i had set MAIL_ENCRYPTION to empty.
When I set MAIL_ENCRYPTION=tls for notify email, it started working.

Resources