• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 31. Event Gateways > A POP3 Custom Gateway

A POP3 Custom Gateway

You've read about the architecture and classes that make up the event gateway, so let's go ahead and walk through making our own custom gateway. In this example, you're going to make a simple gateway that connects to a POP3 server and, if there are new emails on the POP server for a specific account defined in a configuration file, the gateway will send an event to a listener CFC with the number of new emails.

To work through this example, you'll need to have the J2EE.jar, to make use of the javax.mail classes, and the cfusion.jar in your classpath. If you are using ANT you can modify the build.xml file that can usally be found at cf_root\gateway\src\ and use that. . When you do compile the example, you'll want to compile the code and then deploy it as POP3Gateway.jar along with the J2EE.jar. Now let's look at Listing 31.4.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint