Getting no error messages from my code, but nothing is coming from mailgun & also im not getting any logs thru mailgun as well
Having issues sending mail using mailgun any ideas on what im doing wrong?
I'm using laravel AuthController
right out of the box with some adjustments below
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data) {
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
mt_srand((double)microtime()*15000);//optional for php 4.2.0 and up.
$charid = strtoupper(md5(uniqid(rand(), true)));
$uuid = substr($charid, 0, 8)
.substr($charid, 8, 4)
.substr($charid,12, 4)
.substr($charid,16, 4)
.substr($charid,20,12);
$data['confirmationLink'] = $uuid;
//dd($uuid);
Mail::send('emails.confirm', $data, function ($m) {
$m->from('support@support.com', 'Your Application');
$m->to($data['email'])->subject('Welcome to support.com');
});
my emails.confirm
file located in my views
directory
and here is my .env
file
MAIL_DRIVER=mailgun
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=2525
MAIL_USERNAME=postmaster@support.com
MAIL_PASSWORD=1111112312312312321321312
MAIL_ENCRYPTION=null
and last config/services.php
'mailgun' => [
'domain' => env('http://ift.tt/2bJzHb7'),
'secret' => env('key-11111111111111spoof'),
],
so im not sure if its my code or my configuration, thanks for all the help
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire