For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > August 2006 > PEAR - Mail Queue









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PEAR - Mail Queue
faithfulman

2006-07-06, 11:24 am

Hi All,

I am having issues trying to get Mail_Queue PEAR module to function properly. I was first getting the following message:

undefined function: nextid()

I read a posting that talked about updating to the newest CVS version of Mail_QUEUE files and I did that. Now I don't get an error at all, but it doesn't insert my mail messages to the mysql database either. If anyone can help me out with this, I would sure appreciate it. Here is my code:
faithfulman

2006-07-06, 11:25 am

Base Page:

PHP:

require_once "Mail/Queue.php";

$db_options['type']       = 'db';
$db_options['dsn']        = 'mysql://username:password@localhost/mail_q';
$db_options['mail_table'] = 'mail_queue';


$mail_options['driver']   = 'smtp';
$mail_options['host']     = '172.16.244.52';
$mail_options['port']     = 25;
$mail_options['auth']     = false;
$mail_options['username'] = '';
$mail_options['password'] = '';

faithfulman

2006-07-06, 11:28 am

Email CODE:
PHP:

require_once ( "base.php" );


$mail_queue =& new Mail_Queue($db_options$mail_options);


$from 'ncives@oregonfcu.org';
$from_name "Kevin Dude";
$recipient "kevin.dude@domain.org";
$recipient_name "Kevin Dude";
$message 'Hi! This is test message!! :)';
$hdrs = array( 'From'    => $from,
               
'To'      => $recipient,
               
'Subject' => "Testing Email"  );

$mime =& new Mail_mime();
$mime->setTXTBody($message);
$body $mime->get();
$hdrs $mime->headers($hdrs);

$seconds_to_send 3600;
$delete_after_send false;
$id_user 7;
$mail_queue->put$from$recipient$hdrs$body$seconds_to_send$delete_after_send$id_user );



Please help, I am so lost on this. Thanks!

~ Faithful
faithfulman

2006-07-06, 6:21 pm

I have no idea what I did... but it is now working. I chose not to use the name base.php for my file. It is now called configmq.php. I uninstalled and reinstalled Mail_Queue countless times. Anyway, it is working now. :D
P@ou

2006-08-25, 3:27 am

I also use Mail Queue but it takes a long time to send mails.
I had to extend the "Maximum execution time" to 7200.
Is that normal ???

How long does it take for you ??

How can I change that ??

Thanks for your help
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com