JavaScript Editor Javascript validator     Web page editor 


Mail_Queue::put() -- Put a new mail into queue.


require_once 'Mail/Queue.php';

int Mail_Queue::put (string $from, string $to, array $hdrs, array $body [, integer $sec_to_send = 0 [, bool $delete_after_send = TRUE [, integer $id_user = MAILQUEUE_SYSTEM]]])


Injects a new mail into the mail queue.


string $from

Sender e-mail address.

string $to

Recipient e-mail address.

array $hdrs

Array of mail headers as returned by Mail_Mime::headers().

array $body

Mail body array as returned by Mail_Mime::get().

mixed $sec_to_send

Optional - Seconds to pass before delivery is attempted.

mixed $delete_after_send

Optional - Whether or not to delete the mail after delivery.

integer $id_user

Optional - user ID. Stored in queue and readable from mail body object with getIdUser() at a later point.

Return value

returns ID of the record where this mail has been put or Mail_Queue_Error on error


throws no exceptions thrown


This function can not be called statically.

JavaScript Editor Javascript validator     Web page editor