i wanted to use mail in laravel 8 with Laravel Jetstream but I encountered a lot of problems i try use ssl and tsl ,change port 2525,587,465 but also it didnot work
Asked
Active
Viewed 259 times
1 Answers
1
so the perfect answer was as follwing
just set my env as:
```
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=haidarfmgphp@gmail.com
MAIL_PASSWORD=***********
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=haidarfmgphp@gmail.com
MAIL_FROM_NAME=fmg
```
and go to this file:
C:\xampp\htdocs\itis_db\vendor\swiftmailer\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php
exactly in
private function _establishSocketConnection()
and paste these two lines
$options['ssl']['verify_peer'] = FALSE;
$options['ssl']['verify_peer_name'] = FALSE;
but the problem now is the mail read message as a spam
Hint: i work from local host