php - How to show send email message immediately in laravel 4.2 -
i have tried lot show send message immediately,but takes time.
i think queue not working properly.
in app/config/queue.php using
'default' => 'sync'
please me out.i confused now.it taking time show success message want immediate success message
$tasktime = new tasktime(); $tasktime->tasktitle = input::get('tasktitle'); $tasktime->description_task = input::get('taskdescribe'); $tasktime->estimated_time = $case; $tasktime->task_status = input::get('status'); $tasktime->priority_task = input::get('priority'); $tasktime->assignee_id = input::get('assignee_id'); $tasktime->cat_id = input::get('taskcategories'); $tasktime->task_duedate = input::get('duedate'); $tasktime->task_created_by = auth::user()->firstname; $tasktime->created_user_id = auth::user()->id; $tasktime->tasktype = input::get('tasktype'); $tasktime->unsc=$cnt; $tasktime->save(); // send mail assignee id $assigneeuser = user::find(input::get('assignee_id')); mail::send(array('html'=>'emails.send'),array('tasktitle' => input::get('tasktitle'), 'priority_task' => input::get('priority')), function ($message) use ($assigneeuser) { $message->to($assigneeuser->email)->subject('verify'); }); return redirect::to('toggle')->with('message', 'email has been sent assignee related work');
queuing message means not sending instantly. process done in background. send email instantly can use:
mail::send(array('html.view', 'text.view'), $data, $callback);
ref: laravel 4.2 mail doc
Comments
Post a Comment