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

Class: Mail_Queue

Source Location: /Mail_Queue-1.1.2/Queue.php

Class Overview

PEAR
   |
   --Mail_Queue

Mail_Queue - base class for mail queue managment.


Author(s):

Version:

  • $Id: Queue.php,v 1.14 2004/07/18 14:59:15 quipo Exp $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 157]
Mail_Queue - base class for mail queue managment.
  • Author: Radek Maciaszek <wodzu@tonet.pl>
  • Version: $Id: Queue.php,v 1.14 2004/07/18 14:59:15 quipo Exp $
  • Access: public


[ Top ]


Class Variables

$container =

[line 173]

Mail_Queue_Container

Type:   object


[ Top ]

$mail_options =

[line 166]

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

Type:   array


[ Top ]

$send_mail =

[line 180]

Reference to Pear_Mail object

Type:   object


[ Top ]



Method Detail

Mail_Queue (Constructor)   [line 204]

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 245]

void _Mail_Queue( )

Mail_Queue desctructor
  • Access: public

[ Top ]

errorMessage   [line 456]

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 261]

void factorySendMail( )

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

[ Top ]

get   [line 380]

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 440]

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 405]

mixed put( string $from, string $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   $to   —  Reciepient e-mail
string   $hdrs   —  Mail headers (in RFC)
string   $body   —  Mail body (in RFC)
   $sec_to_send   — 
   $delete_after_send   — 

[ Top ]

sendMail   [line 358]

mixed sendMail( object MailBody $mail)

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

Parameters:

object MailBody   $mail   —  object

[ Top ]

sendMailById   [line 337]

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 302]

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 279]

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 Mon, 11 Mar 2019 13:54:01 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.