Mail_Queue
[ class tree: Mail_Queue ] [ index: Mail_Queue ] [ all elements ]

Class: Mail_Queue

Source Location: /Mail_Queue-1.2.2/Queue.php

Class Overview

PEAR
   |
   --Mail_Queue

Mail_Queue - base class for mail queue managment.


Author(s):

Version:

  • $Id: Queue.php,v 1.26 2008/05/06 20:47:22 till Exp $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 158]
Mail_Queue - base class for mail queue managment.
  • Author: Radek Maciaszek <wodzu@tonet.pl>
  • Version: $Id: Queue.php,v 1.26 2008/05/06 20:47:22 till Exp $
  • Access: public


[ Top ]


Class Variables

$container =

[line 174]

Mail_Queue_Container

Type:   object


[ Top ]

$mail_options =

[line 167]

Mail options: smtp, mail etc. see Mail::factory

Type:   array


[ Top ]

$send_mail =

[line 181]

Reference to Pear_Mail object

Type:   object


[ Top ]



Method Detail

Mail_Queue (Constructor)   [line 205]

mixed Mail_Queue( array $container_options, array $mail_options)

Mail_Queue constructor
  • Return: True on success else PEAR error class.
  • Access: public

Parameters:

array   $container_options     Mail_Queue container options
array   $mail_options     How send mails.

[ Top ]

_Mail_Queue (Destructor)   [line 251]

void _Mail_Queue( )

Mail_Queue desctructor
  • Access: public

[ Top ]

errorMessage   [line 486]

string errorMessage( int $value)

Return a textual error message for a MDB error code
  • Return: error message, or false if the error code was not recognized
  • Access: public

Parameters:

int   $value     error code

[ Top ]

factorySendMail   [line 267]

void factorySendMail( )

Provides an interface for generating Mail:: objects of various types see Mail::factory()
  • Access: public

[ Top ]

get   [line 403]

object Mail_Queue_Container get( )

Get next mail from queue. The emails are preloaded in a buffer for better performances.
  • Return: or error object
  • Access: public

[ Top ]

isError   [line 470]

boolean isError( int $value)

Tell whether a result code from a Mail_Queue method is an error
  • Return: whether $value is an MAILQUEUE_ERROR
  • Access: public

Parameters:

int   $value     result code

[ Top ]

put   [line 428]

mixed put( string $from, string|array $to, string $hdrs, string $body, [ $sec_to_send = 0], [ $delete_after_send = true], [integer $id_user = MAILQUEUE_SYSTEM], string $time_to_send, string $ip)

Put new mail in queue.
  • Return: ID of the record where this mail has been put or Mail_Queue_Error on error
  • See: Mail_Queue_Container::put()
  • Access: public

Parameters:

string   $time_to_send     When mail have to be send
integer   $id_user     Sender id
string   $ip     Sender ip
string   $from     Sender e-mail
string|array   $to     Reciepient(s) e-mail
string   $hdrs     Mail headers (in RFC)
string   $body     Mail body (in RFC)
   $sec_to_send     
   $delete_after_send     

[ Top ]

sendMail   [line 368]

mixed sendMail( object MailBody $mail, [bool $set_as_sent = true])

Send mail from MailBody object
  • Return: True on success else pear error class
  • Access: public

Parameters:

bool   $set_as_sent     
object MailBody   $mail     object

[ Top ]

sendMailById   [line 347]

bool sendMailById( integer $id, [bool $set_as_sent = true])

Send Mail by $id identifier. (bypass Mail_Queue)
  • Return: true on success else false
  • Access: public

Parameters:

integer   $id     Mail identifier
bool   $set_as_sent     

[ Top ]

sendMailsInQueue   [line 308]

mixed sendMailsInQueue( [integer $limit = MAILQUEUE_ALL], [integer $offset = MAILQUEUE_START], [integer $try = MAILQUEUE_TRY])

Send mails fom queue.

Mail_Queue::sendMailsInQueue()

  • Return: True on success else MAILQUEUE_ERROR object.

Parameters:

integer   $limit     Optional - max limit mails send. This is the max number of emails send by this function.
integer   $offset     Optional - you could load mails from $offset (by id)
integer   $try     Optional - hoh many times mailqueu should try send each mail. If mail was sent succesful it will be delete from Mail_Queue.

[ Top ]

setBufferSize   [line 285]

void setBufferSize( [integer $size = 10])

Keep memory usage under control. You can set the max number of mails that can be in the preload buffer at any given time.

It won't limit the number of mails you can send, just the internal buffer size.


Parameters:

integer   $size     Optional - internal preload buffer size

[ Top ]


Documentation generated on Wed, 07 May 2008 12:00:15 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.