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

Example

The following code fragment shows how the routine is used to discard the message part:

mtaDecodeMessagePartDelete(dctx, 0);

The following code fragment shows how to replace the message part with a text warning:


mtaDecodeMessagePartDelete(dctx,
    MTA_REASON, "Warning: virus infected message part was
                 discarded.", 0,”
    MTA_DECODE_CLANG, "en", 2,
    MTA_DECODE_CCHARSET, "us-ascii", 8, 0);

The following code fragment shows the output generated by the preceding code example.


Content-type: text/plain; charset=us-ascii
Content-language: en

Warning: virus infected message part was discarded.

See also Example 5–2.