【问题标题】:Laravel 4: speed up the sending of emailsLaravel 4:加快电子邮件的发送速度
【发布时间】:2013-09-23 14:23:54
【问题描述】:

我是使用 Laravel 4 发送电子邮件的 SwiftMailer。 它工作正常,但发送一封邮件大约需要 5 秒。

有可能以某种方式加快这个过程吗?

谢谢!

编辑:我想在这个函数中使用队列:

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

我在 iron.io 中创建了一个帐户,并将 project_id 和令牌插入 queue.php。在这种情况下我必须插入什么作为队列名称?

【问题讨论】:

    标签: laravel laravel-4 swiftmailer


    【解决方案1】:

    使用队列:http://laravel.com/docs/queues

    在 Laravel 中设置 IronMQ 非常简单:http://iron.io/

    这是 Taylor 的截屏视频:http://vimeo.com/64703617

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-04-19
      • 2016-01-24
      • 1970-01-01
      • 2013-09-15
      • 1970-01-01
      • 1970-01-01
      • 2017-02-11
      相关资源
      最近更新 更多