Source for file add_example.php
Documentation is available at add_example.php
$mail_queue = & new Mail_Queue($db_options, $mail_options);
$from = 'user@server.com';
$recipient = 'user2@server.com';
$recipient_name = 'admin';
$message = 'Hi! This is test message!! :)';
$from_params = !empty ($from_name) ? '"'. $from_name. '" <'. $from. '>' : '<'. $from. '>';
$recipient_params = !empty ($recipient_name) ? '"'. $recipient_name. '" <'. $recipient. '>' : '<'. $recipient. '>';
'To' => $recipient_params,
'Subject' => 'test message body',
$mime->setTXTBody ($message);
$hdrs = $mime->headers ($hdrs);
/* Put message to queue */
$mail_queue->put ($from, $recipient, $hdrs, $body);
/* Also you could put this msg in more advanced mode */
// how many seconds wait to send mail
// delete mail from db after send?
$delete_after_send = false;
// if you backup some mails in db you could group them later by the user identifier, for example
$mail_queue->put ($from, $recipient, $hdrs, $body, $seconds_to_send, $delete_after_send, $id_user);
Documentation generated on Mon, 11 Mar 2019 15:44:08 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|