NAME

     imme_copy - Makes a verbatim copy of a  message  header  and
     content


SYNOPSIS

     #include <imta.h>

     int imme_copy(imme_t me, immd_t md);


DESCRIPTION

     Use imme_copy() to efficiently copy to a new  message  being
     enqueued  a  verbatim copy of a message being dequeued. Only
     the portion of the dequeued message following the read point
     for  that  message  will  be  copied.  Thus,  if  the entire
     dequeued message - header and content -  is  to  be  copied,
     then   it  may  be  necessary  to  first  call  immd_rewind.
     imme_copy() is especially useful in cases  where  a  message
     needs to have its envelope changed but be left enqueued. For
     example, when a message was successfully delivered  to  some
     but  not  all recipients. In that case, if some of the reci-
     pients could not be delivered to owing  to  temporary  prob-
     lems,  the  message  should  be re-enqueued verbatim to just
     those recipients who could not be handled  because  of  tem-
     porary  problems.  In  such  a  case,  be  sure to also call
     imme_AliasNoExpansion while enqueuing the new  message.   me
     is  the  enqueue  context previously created with imme_init.
     md is a dequeue context created with immd_init.


RETURN VALUES

     imme_copy() returns IMRC_OK when successful.

     Otherwise, one of the following error codes is returned:

     IMRC_BAD_CONTEXT      The enqueue context me or the  dequeue
                           context md has not been initialized or
                           has   been   corrupted.    Make   sure
                           imme_init()   or  immd_init()  respec-
                           tively, has been previously called.

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


ATTRIBUTES

               _______________________________________
                  Attribute Type      Attribute Value
               _______________________________________
                Architecture          sparc, x86
               _______________________________________
                Availability          SUNWimsdk
               _______________________________________
                MT-Level              MT-Safe

               _______________________________________
                Interface Stability   Stable
               _______________________________________
              |                    |                 |

SEE ALSO | | |

     imme_init(3),    imme_AliasNoExpansion(3),     immd_init(3),
     immd_rewind(3)                |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |
              |                    |                 |