我在Linux服务器(Ubuntu 10.10)上使用来自PHP(CakePHP 1.3)的sendmail,并且它需要永久执行,但最终会通过。 SMTP作为一个守护进程运行 - 有一段时间,我认为问题在于它必须在每个send()开始进程。Sendmail()需要很长时间才能执行
当谈到服务器配置时,我是一个新手,所以任何帮助表示赞赏。
这里是我的应用程序代码,以供参考:
$this->Email->from = 'Hello <[email protected]>';
$this->Email->to = 'Hello <[email protected]>';
$this->Email->subject = 'Hello';
$this->Email->sendAs = 'html';
$this->Email->template = 'my_template';
$this->data['Inquiry']['id']= $this->Inquiry->id;
$this->set('inquiry', $this->data['Inquiry']);
$this->Email->send();
也许你的邮件日志文件中有任何指针? – Oldskool 2012-01-30 15:11:52
常识:使用一致的命名约定被认为是最佳实践,所有变量,属性,函数和方法名称都应该是小写字母,多个单词可以命名为with_underscores_each或withCamelCase。只有类名应该有第一个字母大写。 – 2012-01-30 15:13:55
如果邮件实际发送,那么可能是您的smtp/sendmail deamon收集邮件并以幕间隔发送邮件。 – 2012-01-30 15:14:42