2013-07-14 107 views
0

我使用codeigniter電子郵件類和幫助程序。一切都很順利,就在昨天,我不認爲我已經做了什麼,但現在我只是沒有收到任何電子郵件。 print_debugger()迴應郵件已成功發送,但我的Gmail收件箱中沒有電子郵件,垃圾郵件中也沒有。codeigniter,發送後沒有收到郵件

我還配置了一個James電子郵件服務器,我也無法收到任何電子郵件。我真的不知道該怎麼做。我讀了一些地方,可能我多次聲明瞭$this->load->library('email'),所以我刪除了所有那些語句,而不是我爲此創建了一個自動加載函數。在框架內沒有任何錯誤,但電子郵件不能收到。

$config['protocol'] = 'sendmail'; 
    $config['charset'] = 'iso-8859-1'; 
    $this->email->initialize($config); 

    $this->email->from('[email protected]', 'Admin'); 
    $this->email->to('[email protected]'); 

    $this->email->subject('subject'); 
    $this->email->message('email body'); 

    $this->email->send(); 

    echo $this->email->print_debugger(); 

輸出是這樣的:

Your message has been successfully sent using the following protocol: sendmail 
User-Agent: CodeIgniter 
Date: Sun, 14 Jul 2013 21:54:39 +0200 
From: "Admin" 
Return-Path: 
To: [email protected] 
Subject: =?iso-8859-1?Q?subject?= 
Reply-To: "[email protected]" 
X-Sender: [email protected] 
X-Mailer: CodeIgniter 
X-Priority: 3 (Normal) 
Message-ID: <[email protected]> 
Mime-Version: 1.0 
Content-Type: text/plain; charset=iso-8859-1 
Content-Transfer-Encoding: 8bit 

電子郵件正文

回答

0

您可能想通過查看正在使用發送郵件服務器上的郵件服務器日誌啓動來自您的codeignitor腳本的傳出消息。這些應該顯示您(a)傳出郵件服務器是否正在從您的codeignitor腳本接收排隊消息,並且如果是 - (b)嘗試向遠程MTA傳遞郵件時發生了什麼情況。

+0

謝謝你的回答。有趣的事情發生了,我重新啓動了我的Mac,然後收到300封郵件: - /我不知道問題到底在哪,但是重新啓動。 – kalafun

相關問題