2014-04-19 104 views
1

我有一個控制器(在cakephp上)發送電子郵件。但是用戶收到的電子郵件的日期和日期並不相同:2038年1月19日4:14(這似乎是2038年的錯誤)。 我已經做了一些測試,但我無法找到控制器頁面上包含的正確參數。這裏是代碼:收到的電子郵件日期(2038年1月19日)

function _sendNewMessageNotification($ message_id){qw = $ this-> Message-> findById($ message_id);

 $this->Email->to = $q['Receiver']['email'] ; 
     //$this->Email->bcc = array('[email protected]'); 
     $this->Email->subject = 'You have a new message on Xxxxxx'; 
     $this->Email->replyTo = '[email protected]'; 
     $this->Email->from = 'Xxxxx <[email protected]>'; 
     $this->Email->template = 'messages/new_message_notification'; // note no '.ctp' 
       //Send as 'html', 'text' or 'both' (default is 'text') 
     $this->Email->sendAs = 'html'; // because we like to send pretty mail 
       //Set view variables as normal 
       //Do not pass any args to send() 
     $this->set('message', $q) ;    
     $this->Email->send(); 

事先非常感謝,如果你能幫助

回答

-1

我說:

$this->Email->date = 'members/date';

它的工作好

相關問題