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 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
    • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
    • ¥15 cmd cl 0x000007b
    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
    • ¥500 火焰左右视图、视差(基于双目相机)
    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号