Zend Framework - 未连接到 IMAP 邮件服务器 - 而是转储空 php 文件
大家好,我正在尝试使用 zend 框架 Zend_Mail_Storage_Imap 函数连接到 imap 邮件服务器。它适用于某些帐户,但对于大多数帐户来说它就消失了。我正在使用以下方式连接:
$mail = new Zend_Mail_Storage_Imap(array('host' =>$current_dept->incoming_server,
'ssl' =>$current_dept->ssl,
'port'=>$current_dept->incoming_port,
'folder'=>$mbox_name,
'user' =>$current_dept->email,
'password' =>$current_dept->email_psd));
对于一些电子邮件帐户,代码不会超出此语句 - 相反,系统会提示我“下载”正在运行的 php 文件。这里发生了什么 - 邮件服务器详细信息是正确的。
Hi guys I'm trying to connect to an imap mail server using zend frameworks Zend_Mail_Storage_Imap function. Its working with some accounts but with most accounts it just dies out. I'm connecting using:
$mail = new Zend_Mail_Storage_Imap(array('host' =>$current_dept->incoming_server,
'ssl' =>$current_dept->ssl,
'port'=>$current_dept->incoming_port,
'folder'=>$mbox_name,
'user' =>$current_dept->email,
'password' =>$current_dept->email_psd));
WIth some email accounts teh code doesn't go past this statement - and instead I'm prompted to 'download' the php file being run. Whats happening here - the mail server details are correct.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否禁用了错误报告?通常,当出现问题时,您应该会收到有用的消息。
使用
和/或
在配置文件 (application.ini) 中 。当然,您也可以在 php.ini 中进行此设置。
此时应该显示错误(或记录到 /tmp/php-error.log)以帮助您进行调试。
Did you disable error reporting? Usually you should get a helpful message when something goes wrong.
Use
and/or
in your configuration file (application.ini). Of course you can make this settings also in the php.ini.
By this an error should be displayed (or logged to /tmp/php-error.log) to help you with debugging.
如果它为您提供 PHP 文件下载(并且您在接受下载时确实收到了 PHP 代码),则您的网络服务器配置有问题。
您必须确保 .php 文件正确运行。
If it offers you the PHP file for download (and you really receive the PHP code then when accepting the download), there is something wrong with your webserver configuration.
You must make sure that .php files are run properly.