Sun Java System Messaging Server 6 2005Q4 MTA Developer's Reference

Description

After a message’s list of envelope recipient addresses has been supplied with mtaEnqueueTo(), the message itself must be supplied. This is done by repeatedly calling mtaEnqueueWrite(). First the message’s header should be supplied, followed by a blank line, followed by any message content. Each line of message data must be terminated by a US-ASCII line-feed character (0x0A). Each call to mtaEnqueueWrite() can supply one or more bytes of the message’s data. Unlike mtaEnqueueWriteLine(), a single call to mtaEnqueueWrite() does not necessarily correspond to a single, complete line of message data; it could correspond to a partial line, a complete line, multiple lines, or even one or more complete lines plus a partial line. This flexibility with mtaEnqueueWrite() exists because it is up to the caller to supply the message line terminators. Calling either mtaEnqueueWrite() or mtaEnqueueWriteLine() terminates the message’s envelope recipient list. Once either of these routines have been called, mtaEnqueueTo() can no longer be called for the same enqueue context.