I have set up laravel 5.6 on server. When I try to use Forget Password, I am gettting error after enter email id:
Class Swift_AddressEncoder_IdnAddressEncoder does not exist
actually, it was working find two days before but now i dont know what happen...I have done thing in it.
below connection in .env:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=apikey
MAIL_PASSWORD=SG.EcuUbtbhSbq1IAh**1tPQg.uFah8Jw**7lh10wGpA_CPU01ySmAC26HFylz_BFI
MAIL_ENCRYPTION=tls
MAIL_FROM_NAME="Your Trade Log"
MAIL_FROM_ADDRESS=support#y**r**r*a**.com
this is live link for Reset Password: YourTradeLog
Related
P.S. I am doing all of this testing on my local machine.I have tested my smtp settings with this online website https://www.smtper.net/. Each one of below services are sending the emails.
I am trying to setup email confirmation system for my Laravel application and keep on getting this error with email created through cpanel.
I have tried using Gmail/mailtrap/mailosaur for testing with these settings and everything was working fine:
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=email#gmail.com
MAIL_PASSWORD='password'
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=email#gmail.com
MAIL_FROM_NAME="${APP_NAME}"
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=ab723b95067210
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
MAIL_MAILER=smtp
MAIL_HOST=mailosaur.net
MAIL_PORT=2525
MAIL_USERNAME=hgyqqqgn#mailosaur.net
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
MAIL_FROM_NAME="${APP_NAME}"
but now when I am using my custom email i am getting this error in my logs file:
[2021-12-26 09:17:53] local.ERROR: Expected response code 250 but got code "550", with message "550-Requested action not taken: mailbox unavailable
550 Sender address has null MX
" {"exception":"[object] (Swift_TransportException(code: 550): Expected response code 250 but got code "550", with message "550-Requested action not taken: mailbox unavailable
550 Sender address has null MX
MAIL_MAILER=smtp
MAIL_HOST=smtp.ionos.com
MAIL_PORT=587
MAIL_USERNAME=noreply#domain.co.uk
MAIL_PASSWORD='password'
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply#domain.co.uk
MAIL_FROM_NAME="${APP_NAME}"
"mailbox unavailable 550 Sender address has null MX".
It seems your smtp server can't find the IP address of the receiving mail server.
Are you sending to a valid email address?
Have you set up a DNS MX record?
This configuration is working well on my environment. Please try like this.
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=<your_username_goes_here>
MAIL_PASSWORD=<your_password_goes_here>
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=<your_email_goes_here>
MAIL_FROM_NAME="${APP_NAME}"`
Make sure that the sender email is valid. By that I mean if the provider of your sender email exist.
Example of invalide email: user#exemple.com
I'm trying the reset password email controller in Laravel.
I change my MAIL config in .env file like this:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.aruba.it
MAIL_PORT=465
MAIL_USERNAME=xxxxxxxxxxxx
MAIL_PASSWORD=xxxxxxxxxxxx
MAIL_ENCRYPTION=SSL
I got this error:
Swift_TransportException
Failed to authenticate on SMTP server with username
"xxxxxxxxxxxx" using 2 possible authenticators.
Authenticator LOGIN returned Expected response code 235 but got code
"535", with message "535 5.7.0 ...authentication rejected ".
Authenticator PLAIN returned Expected response code 235 but got code
"535", with message "535 5.7.0 ...authentication rejected
How can I solve it ?
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=<mailtrap username>
MAIL_PASSWORD=<mailtrap passsword>
MAIL_ENCRYPTION=SSL
signup https://mailtrap.io after signin they provide demo inbox then click on demo inbox. right hand side you get your username & password. just copy and paste
MAIL_DRIVER=smtp
MAIL_HOST=smtp.aruba.it
MAIL_PORT=465 or 25
MAIL_USERNAME=xxxxxxxxxxxx
MAIL_PASSWORD=xxxxxxxxxxxx //in your aruba account. aren't they provided any password like mailtrap.
MAIL_ENCRYPTION=SSL ot tls
i am not sure about this but you can try once
I Want to send reset password email in laravel,with default laravel auth
first login in mailtrap.io and get username and password,then edit env file such as this:
MAIL_DRIVER=sendmail
MAIL_HOST=mail.moallemmarket.com
MAIL_PORT=587
MAIL_USERNAME=username
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
and edit mail.php file such as env,Now I receive We have e-mailed your password reset link! message But don't receive any email in my inbox,I changed ports to 25 ans 2525 But result is same.How I can Solved this problem?
I had no problem coding
The problem with the non-activation of the email was in the cpanel that was solved by sending the ticket
With mailtrap, I use these vars in my .env file:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=username
MAIL_PASSWORD=password
MAIL_ENCRYPTION=null
I want to send mail after registration.But I had faced this problem.Can anyone tell me how can I solve this problem?And I am uploading my env file here.
MAIL_DRIVER=mail
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=kazibablubif#gmial.com
MAIL_PASSWORD=edkecsyimolpbuua
MAIL_ENCRYPTION=tls
Try 2 step verification and add generate app password and add it to your .env file
https://stackoverflow.com/a/32515570/2891689
I use Laravel 5.1 and want to send the admin of the page a mail with the content of a contact form.
In my .env file I added the following lines:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=admintest#gmail.com
MAIL_PASSWORD=adminpassword
MAIL_ENCRYPTION=tls
In my controller I have the following:
Mail::send('Site::email', ['contactObject' => $contactObject], function ($message) use ($contactObject) {
$message->from($contactObject->email, $contactObject->vorname)->subject('New contact!');
$message->to('admintest#gmail.com');
});
$contactObject == contains the form which was filled out in the form from the user
Desired result:
When admintest#gmail.com receive a email, the sender of the mail should be $contactObject->email
Actual result:
When admintest#gmail.com receive a email, the sender of the mail is admintest#gmail.com
Any ideas what goes wrong? Thank you
Try This:
In Live server you have no need to configure any type of mail service.
You have to just use this:
MAIL_DRIVER=mail
AND remove this code:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=admintest#gmail.com
MAIL_PASSWORD=adminpassword
MAIL_ENCRYPTION=tls
You have to just use in .env file:
MAIL_DRIVER=mail
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=xyz#gmail.com
MAIL_PASSWORD=yourpassword
MAIL_ENCRYPTION=tls
After change in .env file, restart service, or use command php artisan config:cache and php artisan config:clear.
Have you configured the global from address in the config?
Specifically here: https://github.com/laravel/laravel/blob/master/config/mail.php#L49
Chances are that you've set that and it's just using that, making these values blank should let you override it.
Failing that, because you're using Gmail to send an email to Gmail, it's likely not letting you spoof the from and is indeed a security feature on their end.