duanchongzi9997 2014-09-11 18:55 采纳率: 0%
浏览 83

照亮命令行队列类,而不是在Homestead的Codeigniter中发送电子邮件

I am using Illuminate Queue in Codeigniter (in a Vagrant Homestead box) and have successfully set up the listening command, as well as the class that gets called when the queue worker gets the job off of the queue (Iron in this case).

Here is the class:

<?php namespace MyApp\Queues\Listeners\ClassToBeCalled;

class ClassToBeCalled
{

    public function fire($job, $data)
    {
        $message = isset($data['message']) ? $data['message'] : 'No message was set';

        mail('test@test.com', 'Test Message', $message);

        $job->delete();
    }

}

The job does get deleted off of Iron when the fire method is ran, but the email does not send (test@test.com is just for this stack question, the actual email address is valid).

Originally I was getting sh: /usr/sbin/sendmail Not Found in the CL when running the listener command and have since installed sendmail in Homestead and I no longer receive that error message. Here is the php.ini settings for the sendmail:

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
; sendmail_path = 

I tried changing sendmail_path to sendmail_path = /usr/sbin/sendmail -t -i and uncommenting it but that didn't do anything.

Any help is greatly appreciated!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#python#的问题:求帮写python代码
    • ¥20 MATLAB画图图形出现上下震荡的线条
    • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
    • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
    • ¥15 perl MISA分析p3_in脚本出错
    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿
    • ¥15 回答4f系统的像差计算