나는 Mosso Cloud Sites 호스팅에 Cakephp 웹 응용 프로그램을 업로드했습니다. 이메일이 더 이상 전달되지 않는 것을 제외하고는 애플리케이션이 정상적으로 작동합니다. 이 사이트는 이메일 전송이 올바르게 작동하는 이전 호스트의 정확한 사본입니다. 이 응용 프로그램은 내장 Cakephp 전자 메일 구성 요소를 사용합니다. Mosso의 기술 자료를 검색하고 PHP 이메일 (htaccess 메서드) here에 대한 지침을 따랐습니다. 내 스크립트는 다음과 같습니다Mosso Cloud 사이트에서 CakePHP 이메일이 전송되지 않음
$this->Email->reset();
$this->Email->sendAs = 'html'; // both = html + plain text
$this->Email->to = '"'.$data['Customer']['first_name'].' '.$data['Customer']['last_name'].'" <' . $data['Customer']['email']. '>';
$this->Email->bcc = $this->_generateRecipients($data['Booking']['sales_associate_id']);
$this->Email->from = '<[email protected]'.env('HTTP_HOST').'>';
$this->Email->replyTo = '<[email protected]'.env('HTTP_HOST').'>';
$this->Email->return = '<[email protected]'.env('HTTP_HOST').'>';
$this->Email->subject = 'Rental Receipt';
// Select appropraite email template
switch ($this->Session->read('site_id')) {
case '100':
$this->Email->template = 'vac_receipt1';
break;
case '200':
$this->Email->template = 'vac_receipt2';
break;
}
$this->Email->send();