• No replies
117 Posts

Pinned topic Sample code : PreProcessReceiverPOP3 exit for receiving plain e-mail.

‏2012-06-18T13:31:34Z |
The attached PreProcessReceiverPOP3 exit extracts all attachments and it creates a new business document for each attachment. When there is no attachment available, the PreProcessReceiverPOP3 will try to convert the e-mail body into a business document.

Actions for installation:

  • Stop the server running the receiver component or stop the receiver cluster.
  • Put the pop3.jar into HUB_HOME\receiver\lib\userexits (or unix equivalent).
  • Start the server running the receiver component or start the receiver cluster.
  • Upload the PreProcessReceiverPOP3.xml into the WPG Console.
  • Add the custom exit to a POP3 receiver.
  • Define a flow

The following e-mail headers are populated into business document attributes:

  • From --> CusMetaData1
  • To --> CusMetaData2
  • Subject --> CusMetaData3
  • Date --> CusMetaData4

The following e-mail headers can be set as user search fields:

  • From --> User search field 1
  • To --> User search field 2
  • Subject --> User search field 3
  • Date --> User search field 4

There is support binary attachments; the senderId is the email from address (lowercase), the receiverId is taken from the exit attribute and the Document Type is the file name extension (lower case).

An email client like Outlook does not set the ContentType for an attachment correctly. Therefore, you are able to set the file extensions for handling text files.

There is support for receiving Message Disposition Notification.


Senior IT-Specialist
IBM Software Services for WebSphere
Software Group, IMT BNL