PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Mail_Queue & /sendmail ?

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Mail
View previous topic :: View next topic  
Author Message
davis



Joined: 07 Jan 2010
Posts: 5
Location: Toronto

PostPosted: Thu Jan 07, 2010 9:26 am    Post subject: Mail_Queue & /sendmail ? Reply with quote

I seem to be having problems trying to send emails with Mail_Queue using sendmail instead of smtp ( smtp works but randomly stops, I think I am triggering some limit with our hosting company, even limiting the # of emails sent to 36 ).

Anyway, below is what I have -- let me know if you need to see more. I dont have any problems inserting into the DB, also the try_send on all the emails remains at 0, is that normal? It also doesn't trigger the IsError, but then I dont think I've fully grasps the whole throwing errors thing.

Code:
$mail_options['driver']    = 'sendmail';
$mail_options['sendmail_path']    = '/usr/sbin/sendmail';

$max_amount_mails = 36;
$mail_queue =& new Mail_Queue($db_options, $mail_options);
$res = $mail_queue->sendMailsInQueue($max_amount_mails);
if (PEAR::isError($res)) { print_r($res); }


edit

[send_mail] => doesn't get populated with a Mail_smtp obj. either.
Back to top
View user's profile Send private message
davis



Joined: 07 Jan 2010
Posts: 5
Location: Toronto

PostPosted: Sun Jan 10, 2010 6:27 pm    Post subject: Reply with quote

Well, I dont know what I did exactly, but I've resolved my problem.

This is a peak at the config for my usage of mail_queue (in case anyone else runs into something similar, they can confirm this does work):

Code:
$db_options['type']       = 'mdb2';
$db_options['dsn']        = array(
                     // override the db_type and use mysqli instead.
                     'phptype'  => 'mysqli',
                     'username' => $id_mq['db_user'],
                     'password' => $id_mq['db_pass'],
                     'hostspec' => $id_mq['db_host'],
                     'database' => $id_mq['db_name'],    );
$db_options['mail_table'] = 'mail_queue';

$mail_options['driver']   = 'sendmail';
$mail_options['sendmail_path'] = '/usr/sbin/sendmail';


Code:
$mail_queue = new Mail_Queue($db_options, $mail_options);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Mail All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement