Question

I am SwiftMailer with Laravel 4 to send emails. It works fine, but it takes about 5 seconds to send a single mail.

It is possible somehow to speed up the process?

Thank you!

EDIT: I Would like to use the queue in this function:

public function send()
{
    $self = $this;
    return \Mail::queue($this->view, $this->data, function($message) use($self)
    {
        $message->to($self->email)->subject($self->subject);
    });
}

I have created an account in iron.io and inserted into queue.php the project_id and the token. What i have to insert in this case as queue-name?

Was it helpful?

Solution

Use Queues: http://laravel.com/docs/queues

It's pretty easy to setup IronMQ in Laravel: http://iron.io/

This is a screencast from Taylor showing it: http://vimeo.com/64703617

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top