mercredi 27 mai 2020

unable to receive emails on gmail, hotmail but receiving on my own smtp server laravel

I have my own smtp host , i can receive email on my outlook but unable to receive on gmail and hotmail servers.

   try {
            \Config::set('mail.username', env('MAIL_USERNAME_GLU'));
            \Config::set('mail.password', env('MAIL_PASSWORD_GLU'));
            \Config::set('mail.host', env('MAIL_HOST_GLU'));
            \Config::set('mail.port', env('MAIL_PORT_GLU'));
            \Config::set('mail.ssl', env('MAIL_PORT_GLU'));
            // \Config::set('mail.encryption', 'tls');
            Mail::to($data['email'])->cc(env('MAIL_CC_GLU'))->send(new GluRmaNotification($data));
            return ["message" => "Email sent successfully"];
        } catch (\Exception $e) {
            return ['message' => $e->getMessage()];
        }


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire