Exercise 2 Orthophoto Notification System
Data Orthophoto images (GeoTIFF)
Overall Goal Provide email-driven access to orthophoto files
Demonstrates Notification topics and email publications
Start Workspace N/A
End Workspace N/A

As a technical analyst in the GIS department a recent project involved setting up a Data Download solution for users to serve orthophoto data to themselves. Having read up about notifications in FME Server, you think that it should be possible to also set up a system that uses email-based automation.


Miss Vector says...
This exercise uses either the SMTP or IMAP protocol for email. To carry out this exercise you will need access to at least one email account in one of these types.

For SMTP, this requires your FME Server to have a DNS record and SMTP configured.

For IMAP this requires access to an email server that supports the IMAP protocol. Gmail, Outlook, and Yahoo! all are acceptable web-based solutions. However, be aware that IMAP connections to a Gmail account can often be blocked as "less secure" leading FME Server to report the account credentials were invalid. See this Google Support article for more information and a solution to this problem. Additionally, be aware that this solution won't work for accounts set up with 2-step verification, which need an application-specific password for less-secure apps to access the account.


1) Create Topic
The first step is to create a publication and topic that will be triggered by the email. So log in to the FME Server web interface and click on the menu item labelled Manage > Notifications.

Click the Publications tab and then click the New button.

Enter EmailReceiver as the new publication's name. Then click in the text box under Topics to Publish To. Type in ImagesIncomingRequest and click on "Click to Add". This will create a new topic and assign it to this publication.

The new publication can be created to use either the Email protocol or the IMAP protocol.

SMTP is easier to set up but FME Server must reside on a server with a proper DNS record (all FME Cloud machines will have this). IMAP is necessary where FME Server resides on an internal network.


Email Protocol

To use the Email protocol select Email (SMTP) as the Publication Protocol. This will open the Email User Name parameter. Enter a name for receiving email, for example fmeimageprocessing

Clicking OK will create an email address fmeimageprocessing@<hostname> - for example:

HostExample Email Address
FME Cloud[email protected]
Amazon AWS[email protected]

Now all emails sent to that address will trigger the ImagesIncomingRequest topic.


IMAP Protocol

To use the IMAP protocol select Email (IMAP) as the Publication Protocol. This will open a number of other parameters. Enter them according to your email account.

In case it is of use, the server information for Gmail is as follows:

  • IMAP Server Host: imap.gmail.com
  • IMAP Server Port: 993
  • Connection Security: SSL
  • Verify SSL Certificate: Yes

You will also need to check the settings in your Gmail account to make sure IMAP is turned on (by default it is not). Regardless of the email provider, you should set these parameters as follows:

  • Poll Interval: 1 minute
  • Emails to Fetch: New Emails Only.

Select a Resource Folder for attachments to be saved to and click OK to close the dialog and create the new Publication.


InteropGeek68 says …
For IMAP, if you don’t have access to a web-based email account, use [email protected] with the password FMENotifications.


2) Test Publication
Now let's test the publication. In the Notifications page on FME Server, click the tab marked Topic Monitoring. Select ImagesIncomingRequest as the topic to monitor:

Now send an email to the address selected for the new publication. When the email is received by FME Server (SMPT) or FME Server fetches it (IMAP) the topic will be triggered with a message:

Remember, an IMAP publication only checks for an email every 60 seconds, so the result might not be immediate.


Ms Analyst says...
In a training course more than one student might be using the IMAP account [email protected], so don't be surprised by multiple messages arriving!

CONGRATULATIONS
By completing this exercise you have learned how to:
  • Create a new Publication
  • Create a new Topic as part of the Create Publication process
  • Use incoming email to trigger topics/notifications
  • Test a publication/topic using Topic Monitoring

results matching ""

    No results matching ""