PEAR邮件队列教程配置麻烦

时间:2012-02-20 17:08:31

标签: php mysql pear mail-queue

我相信我遇到了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容器。我不确定是否有任何细节是重要的。 任何帮助,将不胜感激!我很困惑。非常感谢,乔治

1 个答案:

答案 0 :(得分:1)

使用MDB2。

无法安装MDB2及其mysql选项。 PEAR邮件队列教程中没有明确提到。

现在运作良好。