NAME

     imme_enqueue - Enqueues a message


SYNOPSIS

     #include <imta.h>

     int imme_enqueue( imme_t me);


DESCRIPTION

     The final step in the process of enqueuing a message handled
     by  the  enqueue context me is to call imme_enqueue().  This
     call enqueues the  message  to  the  destination  channel(s)
     determined  by  the  configured  routing  from the recipient
     address(es) specified with imme_add_recipient().

     If an error occurs, the message is  not  submitted.   A  new
     message    may    be    created   with   a   new   call   to
     imme_start_envelope().


RETURN VALUES

     imme_enqueue() returns IMRC_OK when  successful.   Otherwise
     the  message  is not enqueued and one of the following error
     code otherwise.

     IMRC_BAD_CONTEXT
                 The enqueue context me has not been  initialized
                 or  has  been  corrupted.  Make sure imme_init()
                 has been previously called.

     IMRC_NO_ENVELOPE
                 The message envelope has not been created.  Call
                 imme_start_envelope() to create it.

     IMRC_INSUFFICIENT_PRIVILEGES
                 The caller has insufficient privileges to  write
                 to  the queue directories, or the system ran out
                 of disk space.  The message is not enqueued, but
                 the  enqueue  context  for this message is still
                 valid.    It   can   be   removed   by   calling
                 imme_abort().

     IMRC_NO_RECIPIENT
                 No envelope recipient has been  specified.   The
                 message is discarded.

     A textual explanation of the failure can be obtained by cal-
     ling imta_error() immediately afterwards.


ATTRIBUTES




               _______________________________________
              |   Attribute Type   |  Attribute Value|
              |____________________|_________________|
              | Architecture       |  sparc, x86     |
              |____________________|_________________|
              | Availability       |  SUNWimsdk      |
              |____________________|_________________|
              | MT-Level           |  MT-Safe        |
              |____________________|_________________|
              | Interface Stability|  Stable         |
              |____________________|_________________|


SEE ALSO

     imme_init(3),     imme_add_recipient(3),      imta_error(3),
     imme_abort(3)