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.
$from
Sender e-mail address.
$to
Recipient e-mail address.
$hdrs
Array of mail headers as returned by Mail_Mime::headers().
$body
Mail body array as returned by Mail_Mime::get().
$sec_to_send
Optional - Seconds to pass before delivery is attempted.
$delete_after_send
Optional - Whether or not to delete the mail after delivery.
$id_user
Optional - user ID. Stored in queue and readable from mail body object with getIdUser() at a later point.
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.