Ich habe eine funktionierende CakePHP-Webanwendung auf Mosso Cloud Sites-Hosting hochgeladen. Die Anwendung funktioniert einwandfrei, außer dass E-Mails nicht mehr zugestellt werden. Die Site ist eine exakte Kopie von meinem vorherigen Host, wo das Senden von E-Mails korrekt funktionierte. Die App verwendet die integrierte E-Mail-Komponente CakePHP. Ich habe die Wissensdatenbank von Mosso durchsucht und die Anweisungen für die PHP-E-Mail (htaccess-Methode) here befolgt. Mein Skript ist wie folgt:CakePHP E-Mail sendet nicht auf Mosso Cloud-Sites
$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();