ollieread / multiauth

Laravel multi auth
441 stars 109 forks source link

not send email in reminder section #55

Closed Mostafa-akbarzadeh closed 10 years ago

Mostafa-akbarzadeh commented 10 years ago

hi i try to send email to user for reminder password . this is my controller code :

  Password::user()->remind(array("user_email"=>Input::get('email')), function($message) {
         $message->subject('Password reminder');
  });

and my auth config file:

'multi' => array( 'admin' => array( 'email' => 'emails.auth.reminder', 'driver' => 'database', 'table' => 'admins', ), 'user' => array( 'email' => 'emails.auth.reminder', 'driver' => 'database', 'table' => 'users', ) ), 'reminder' => array( 'table' => 'password_reminders', 'expire' => 60, ),

this code not return any error but not send any email to user .

ollieread commented 10 years ago

Are you sure this isn't a problem with your outgoing mail settings?

Mostafa-akbarzadeh commented 10 years ago

solved. i changed to 'driver'=>'eloquent'

'multi' => array( 'admin' => array( 'email' => 'emails.auth.reminder', 'driver' => 'eloquent', 'model' => 'Admin', ), 'user' => array( 'email' => 'emails.auth.reminder', 'driver' => 'eloquent', 'model' => 'User', ) ),

and change my field name 'user_email' table user & admin to 'email'

Password::user()->remind(array('email'=>Input::get('email')), function($message) { $message->from('it@magna.com', 'Laravel'); $message->to(Input::get('email'));
$message->subject('Password reminder'); }); thank you anyway