0

after reloading the page its says mail sent successfully but mail is not received by the server I've trie smtp and mail driver at the end i've had no error with sendmail driver but the mail are not received which are send using the laravel

i've go through these links but they dose not gave the sollution.

Check mail is sent successfully or not on Laravel 5

Check mail is sent successfully or not on Laravel 5

Sendmail Subject in Laravel 5.1 these is the code for i write in mail.php

    <?php
return [
    'driver' => env('MAIL_DRIVER', 'sendmail'),
    'host' => env('MAIL_HOST', 'smtp.gmail.com'),
    'port' => env('MAIL_PORT', 587),

    'from' => [
        'address' => env('MAIL_FROM_ADDRESS', 'XXXX@gmail.com'),
        'name' => env('MAIL_FROM_NAME', 'Example'),
    ],
    'encryption' => env('MAIL_ENCRYPTION', 'tsl'),
    'username' => env('XXX@gmail.com'),
    'password' => env('XXXXXXX'),
    'sendmail' => '/usr/sbin/sendmail -bs',
  'pretend' => false,
];
?>

here is .env file mail

MAIL_DRIVER=sendmail
MAIL_HOST=smtp.gmail.com
MAIL_PORT=2525
MAIL_USERNAME=XXXXX@gmail.com
MAIL_PASSWORD=XXXXXX
MAIL_ENCRYPTION=tsl

and this is my web.php

try {
  Mail::send('mails.name',['name' => "XXXXXX"], function ($message) {
      $message->to('XXXXX@gmail.com','hiii')->from('XXXX.com')->subject('XXXX');

  });
  return "Your email has been sent successfully";
} catch (\Exception $e) {
  echo "err";
}
Milind Modi
  • 321
  • 1
  • 4
  • 12
  • Why would sendmail use the relay options configured in Laravel? What's `tsl`? Where's the MTA logs? Tested with any debugging services? – mario Dec 14 '18 at 22:25
  • PD of https://stackoverflow.com/questions/24644436/php-mail-function-doesnt-complete-sending-of-e-mail – mario Dec 14 '18 at 22:25

0 Answers0