2012-11-20 56 views
1

我已經搜索過高和低。我不是很技術,而且真的很掙扎。 Cron郵件程序,沒有關於CC和BCC的詳細信息。我嘗試了各種代碼,將硬編碼BCC添加到外發電子郵件中。有人提出了一個數組,無法讓它工作。我相信這很簡單,但任何幫助,將不勝感激。我不能去的線被註釋掉了。CakePhp Cron Mailer - Howto BCC

CODE


 $this->EmailQueue->to = $booking['Guest']['email']; 

     //$this->EmailQueue->bcc = '[email protected]'; 

      $this->EmailQueue->from = $email; 
      $this->EmailQueue->headers = array(
       'booking_token' => $booking['Booking']['token'], 
      ); 
      $this->EmailQueue->additionalParams = '-f ' . $bounce_options['bounce_email']; 
      $this->EmailQueue->return = $bounce_options['bounce_email']; 
      $this->EmailQueue->subject = $template['EmailTemplate']['subject']; 
      $this->EmailQueue->template = 'mailman_invitation'; 
      $this->EmailQueue->sendAs = 'both'; 
      $this->EmailQueue->delivery = 'db'; 
      $this->set('body', $template['EmailTemplate']['html']); 

回答

0

包括密件抄送到您的EmailQueue變量的頭變量。

你必須修改代碼以這種

$this->EmailQueue->headers = array(
       'booking_token' => $booking['Booking']['token'], 
       'bcc' => '[email protected]' 
      ); 
+0

感謝您的回覆 試過這種沒有任何的運氣。設法得到另一封郵件與以下代碼發送,而不是BCC。有任何想法嗎? \t \t $ this-> EmailQueue-> to = $ booking ['Guest'] ['email']。',[email protected]'; – user1679844