我已经上传了一个工作的Cakephp web应用程序到Mosso云网站托管。除了不再发送电子邮件外,应用程序运行正常。这个网站是我之前的主机上的一个副本,在那里发送电子邮件是正常的。该应用程序使用内置的Cakephp电子邮件组件。我已经搜索了Mosso的知识库,并遵循php email (htaccess method) here的说明。我的脚本如下:
$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 = '<noreply@'.env('HTTP_HOST').'>';
$this->Email->replyTo = '<noreply@'.env('HTTP_HOST').'>';
$this->Email->return = '<noreply@'.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();发布于 2009-04-22 16:26:13
在与Mosso工作人员详细讨论了这个问题后,他们的一名linux管理员介入,并在审查代码后指出,Mosso Cloud Sites电子邮件系统不支持代码生成的电子邮件的密件抄送或抄送。因此,由于我的代码使用Bcc向我们的员工和客户发送了一份副本,因此我的电子邮件没有被发送,也没有抛出PHP错误。
因此,如果您使用Mosso云网站,您不能发送电子邮件密件抄送或抄送代码。学到的经验教训,但在他们的知识库中应该更容易找到。
发布于 2009-04-09 09:48:23
我会发表评论,但还没有这样的名气。
不管怎样,你检查过send()返回值了吗?您的日志文件中是否有任何错误?如果没有错误并且返回值正常,您可能应该联系主机的支持人员。
https://stackoverflow.com/questions/712319
复制相似问题