我相信我在使用PEAR邮件队列教程的.config文件时遇到了问题。我已经检查了我的路径,它们都很好。
<?php
require_once "Mail/Queue.php";
$db_options['type'] = 'db';
$db_options['dsn'] = 'mysql://mysqlusername:mysqlpasswd@localhost/mail';
$db_options['mail_table'] = 'mail_queue';
$mail_options['driver'] = 'smtp';
$mail_options['host'] = 'smtp.tiscali.co.uk';
$mail_options['port'] = 25;
$mail_options['localhost'] = 'localhost'; //optional Mail_smtp parameter
$mail_options['auth'] = false;
$mail_options['username'] = 'username';
$mail_options['password'] = 'passwd';
?> 我可以使用smtp.tiscali.co.uk独立发送SMTP邮件。我已经在数据库邮件中仔细地输入了这个表。我添加了适当的MySQL GRANT权限。我的代码在这里会在add_message.php中终止,但我知道输入了mail_queue语句。
<?php
include './config.php';
/* we use the db_options and mail_options here */
$mail_queue =& new Mail_Queue($db_options, $mail_options);
/* the rest */
?>szerne在bluehostforum上也有类似的帖子。http://www.bluehostforum.com/archive/index.php/t-19791.html它看起来和我的没有太大的不同,但是使用了一个mdb2容器。我不确定是否有任何细节是重要的。任何帮助都将不胜感激!我很困惑。非常感谢,乔治
发布于 2012-02-26 00:40:56
使用MDB2。
安装MDB2及其mysql选项失败。在PEAR邮件队列教程中没有明确提到。
现在运行得很好。
https://stackoverflow.com/questions/9365266
复制相似问题