2016-01-14 32 views
0

框架:Laravel 4.2Laravel 4.2郵件突然停在Amazon EC2上的Linux工作

服務器:Amazon EC2上的Linux

昨天\Mailing::send還在工作,然後今天突然它停止發送電子郵件。我不知道發生了什麼事。

這裏是我的mail.php配置:

<?php 

return array(

    /* x 
    |-------------------------------------------------------------------------- 
    | Mail Driver 
    |-------------------------------------------------------------------------- 
    | 
    | Laravel supports both SMTP and PHP's "mail" function as drivers for the 
    | sending of e-mail. You may specify which one you're using throughout 
    | your application here. By default, Laravel is setup for SMTP mail. 
    | 
    | Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "log" 
    | 
    */ 

    'driver' => 'mail', 

    /* 
    |-------------------------------------------------------------------------- 
    | SMTP Host Address 
    |-------------------------------------------------------------------------- 
    | 
    | Here you may provide the host address of the SMTP server used by your 
    | applications. A default option is provided that is compatible with 
    | the Mailgun mail service which will provide reliable deliveries. 
    | 
    */ 

    'host' => 'mail.1fx.cash', 

    /* 
    |-------------------------------------------------------------------------- 
    | SMTP Host Port 
    |-------------------------------------------------------------------------- 
    | 
    | This is the SMTP port used by your application to deliver e-mails to 
    | users of the application. Like the host we have set this value to 
    | stay compatible with the Mailgun e-mail application by default. 
    | 
    */ 
    'port' => 587, 

    /* 
    |-------------------------------------------------------------------------- 
    | Global "From" Address 
    |-------------------------------------------------------------------------- 
    | 
    | You may wish for all e-mails sent by your application to be sent from 
    | the same address. Here, you may specify a name and address that is 
    | used globally for all e-mails that are sent by your application. 
    | 
    */ 

    'from' => array('address' => '[email protected]', 'name' => '1Fx Cash'), 

    /* 
    |-------------------------------------------------------------------------- 
    | E-Mail Encryption Protocol 
    |-------------------------------------------------------------------------- 
    | 
    | Here you may specify the encryption protocol that should be used when 
    | the application send e-mail messages. A sensible default using the 
    | transport layer security protocol should provide great security. 
    | 
    */ 

    'encryption' => 'tls', 

    /* 
    |-------------------------------------------------------------------------- 
    | SMTP Server Username 
    |-------------------------------------------------------------------------- 
    | 
    | If your SMTP server requires a username for authentication, you should 
    | set it here. This will get used to authenticate with your server on 
    | connection. You may also set the "password" value below this one. 
    | 
    */ 

    'username' => '[email protected]', 

    /* 
    |-------------------------------------------------------------------------- 
    | SMTP Server Password 
    |-------------------------------------------------------------------------- 
    | 
    | Here you may set the password required by your SMTP server to send out 
    | messages from your application. This will be given to the server on 
    | connection so that the application will be able to send messages. 
    | 
    */ 

    'password' => '******', 

    /* 
    |-------------------------------------------------------------------------- 
    | Sendmail System Path 
    |-------------------------------------------------------------------------- 
    | 
    | When using the "sendmail" driver to send e-mails, we will need to know 
    | the path to where Sendmail lives on this server. A default path has 
    | been provided here, which will work well on most of your systems. 
    | 
    */ 

    'sendmail' => '/usr/sbin/sendmail -bs', 

    /* 
    |-------------------------------------------------------------------------- 
    | Mail "Pretend" 
    |-------------------------------------------------------------------------- 
    | 
    | When this option is enabled, e-mail will not actually be sent over the 
    | web and will instead be written to your application's logs files so 
    | you may inspect the message. This is great for local development. 
    | 
    */ 

    'pretend' => false, 

); 

我試圖重新啓動實例。它仍然沒有發送。

回答

1

首先找出是否有任何郵件卡在電子郵件後臺打印。如果它是空的,那麼它是lavarels問題。否則,郵件會卡住,並可能受到反垃圾郵件過濾器的影響。要解決它填充此form

+0

是的麥克我覺得你差不多了。我做了一個'cron作業',每分鐘發送一次郵件。我去睡覺,接下來的事情在早上我收到1000封電子郵件和1000封電子郵件。我該怎麼辦?時間會解決它? –

+0

我應該等待郵件進行處理,Gmail會將它作爲垃圾郵件刪除嗎? –

+0

亞馬遜限制您可以發送的電子郵件數量。它們可能卡在卷軸中,然後作爲整包裝送出。我建議填寫表格並從垃圾郵件中刪除電子郵件。應該及時幫助。 –