360Works CloudMail 2.04 User Guide



FileMaker version 11 or higher.

360 Works plug-ins require Java in order to run. FileMaker Pro will prompt you on startup to download the appropriate software if it is not found on your computer. FileMaker Server has no such prompt, and you may be required to manually download a Java Runtime (JRE) if you do not already have one. On Windows, you will need a current version of Java, Oracle downloads. On Mac, you will need the latest Java 6 update from Apple. For Mac OS 10.6, click here. For Mac OS 10.7-10.10, click here, For OS X 10.11, El Capitan click here

Note to intel Mac users: running this plugin under Rosetta is not supported. Upgrade to FileMaker 8.5 to run our plugin in native Intel mode.

Install Steps for FileMaker Pro

Drag the plugin from the MAC or WIN folder into your FileMaker extensions, and restart FileMaker.

If the plugin does not load correctly, double-check that you meet the system requirements.

WebDirect Install (FMS 13+)

Install plug-ins for use with WebDirect by dragging the appropriate plugin to FileMaker Server/Web Publishing/publishing-engine/cwpc/Plugins

Install steps for Instant Web Publishing

You do not need to do this step unless you plan on using the plugin with Instant Web Publishing with FileMaker Server Advanced. You will need an Enterprise license to use this feature.

For installing into the Web Publishing Engine with FileMaker Server or FileMaker Server Advanced, drag the plugin from the MAC (.fmplugin file) or WIN (.fmx file) folder into the FileMaker Server/Web Publishing/publishing-engine/wpc/Plugins folder. If there is no Plugins folder inside the wpc folder, then create it manually. Restart FileMaker Web Publishing, and now the plugins should be ready to go.

The easiest way to test whether the plugin is working is to have a calculation which calls the version function of the plugin, and display that on an IWP layout. If it shows "?", then the plugin is not working. If it shows a number, then the plugin has been installed successfully.

Install steps for Custom Web Publishing

If you are using FileMaker Server 12.0v1 or earlier, you can follow the same procedure as detailed above for custom web publishing. However, in FileMaker Server 12.0v2 and later, custom web publishing now runs as a 64-bit application and requires a slightly different location. You will need an Enterprise license to use this feature.

For Mac, the single plug-in file in the MAC directory contains both 32-bit and 64-bit versions. For Windows, look for the plug-in that has the extension .fmx64 and use it in exclusively in custom web publishing.

To install 64-bit plug-ins, install either the .fmx64 or the .fmplugin to the following directory:

,FileMaker Server / Web Publishing / publishing-engine / cwpc / Plugins

If it does not exist, create the Plugin folder manually. Restart FileMaker Web Publishing, and then you can then test a script that contains a plug-in and see if it returns the correct values.

Please note that plug-ins do not work with the web publishing engine of the Mac version of FileMaker Server 8.0v4.

Install steps for server scheduled scripts

You do not need to do this step unless you plan on using the plugin with scheduled script triggering. You will need an Enterprise license to use this feature.

  1. Drag the plugin from the MAC (.fmplugin file) or WIN (.fmx64 file) folder into the FileMaker Server extensions folder. On Mac OS X, this is located at /Library/FileMaker Server/Database Server/Extensions folder. On Windows, this is at C:\Program Files\FileMaker\FileMaker Server\Database Server\Extensions.
  2. In the Server Admin application, restart FileMaker Server by stopping and starting it.
  3. Go to Configuration -> Database Server->Server Plug-ins and check the box that says 'Enable FileMaker Server to use plug-ins', and then check the 'enabled' box for this plugin. Click the 'save' button and wait a few seconds to make sure that the 'enabled' check box stays checked. If it does not, then there was an error loading the plugin and you should contact us for help troubleshooting. You should now be able to write schedules that trigger scripts which use the plugin.

Auto Update

360Works has created an AutoUpdate helper database which makes setting up AutoUpdate much easier. This file includes pre-configured plugin files which you can place on your server, and an AutoUpdate script for each of our plugins which you can paste into your own solution.

You can get the AutoUpdate360Works file at:

Follow the instructions included in the file to either host your own Auto Update server or pull the files from ours.

Uninstalling the plugin

Uninstall the plugin by quitting FileMaker Pro or stopping FileMaker Server and removing the plugin file from your Extensions directory.

Demo mode and Registering the plugin

Plugins will run in demo mode until they are registered. While running in Demo mode, the product will run for 2 hours every time you launch FileMaker / FileMaker Server / FileMaker Web Publishing Engine. The 2 hour time limit will reset every time you relaunch FileMaker. There is no expiration date when Demo mode stops working. There are no feature differences between the Demo version and the licensed version.

Once you have purchased the plugin, you can register it with the license key. Once a valid license key is entered, the product will run for as long as FileMaker is running. After FileMaker starts up with the plugin installed, open FileMaker preferences, click on the Plug-ins tab, select the plugin from the list, and click the Configure button. Enter your license key and company name in this dialog. You will only need to do this once on a given machine. Alternately, you can use the registration function to register the plugin during a startup script.

Note that if you are running the plugin with FileMaker Server / FileMaker Web Publishing Engine, you must use the registration function to register the plugin, since there is no preferences dialog on FileMaker Server to enter the license key and company name.


We love to hear your suggestions for improving our products! If you are experiencing problems with this plugin, or have a feature request, or are happy with it, we'd appreciate hearing about it. Send us a message on our website, or email us!

Error Handling/Reporting

When something unexpected happens, the plug-in will pop up a dialog showing what the error message is. This makes it easy to see what went wrong. However, in some cases, you (the developer) may prefer to show your own message to the user, or possibly not show a message at all. In that case, you can call CMSetErrorCapture with a parameter of true. That will suppress the error dialog from appearing to the user.

When you call this function, it is set for that plug-in for as long as FileMaker is running, so if you want to do all of your own error handling, you can just set it to true once in your startup script. However, we recommend only turning it on when your script is prepared to check for errors, and then turning it off after finishing that section.

Whether or not you suppress the error dialogs, a plugin function will return the word ERROR if something goes wrong. It's a good idea to put your plugin functions in an 'If' statement so that you don't execute a bunch of script steps after something has gone wrong. If you'd like for your script to get the error message, you can get that by calling the CMLastError function.

Here is an example of basic error reporting:

Set Variable [ $result = MyPluginFunction("x" ; "y" ; "z") ]
If [ $result = "ERROR" ]
    Exit Script[ "Error occurred: " & CMLastError ]
    ... do more stuff here ...
End If

Chaining Multiple Functions Together

Since the string "ERROR" evaluates to false when evaluated by FileMaker, and most plugin functions return a 1 when successful, you can chain multiple dependent plugin operations together using the "and" operator. However, in this case the result will be a 1 or a 0, not "ERROR". For example:

// chain multiple calls together
// if any of the functions fail, the calculation will
// short-circuit with a result of false,
// and none of the subsequent function calls will be evaluated.
Set Variable [ $success =
    FirstPluginFunction("x") and
    SecondPluginFunction("y") and
If [not $success]
    Show Custom Dialog [ "An error occurred: " & CMLastError ]
End If

Note: the above only works for plugin functions which return 1 on success! Check the documentation for each function used in this manner.

Additional Error Checking - Plugin not installed

If a plugin is not installed correctly, calls to a plugin function will return "?". As part of your startup script, you should check for this occurrence and display a warning accordingly that the plugin needs to be installed. Note: when treated as a boolean true/false value, FileMaker will treat ? as true.


360Works CloudMail is a plug-in for sending outbound e-mail messages and monitoring e-mail interactions using Amazon Web Services.

This documentation lists the plug-in API reference. For a guide to getting started with CloudMail, go to the CloudMail documentation wiki.

Function Summary

Function Detail

CMAddRecipient ( recipient )

Call this function once for each e-mail recipient before calling the CMQueueMessage function. This list will be cleared out after CMQueueMessage runs.


CMAddToBlacklist ( address; date; campaignName )

Use this function to manually add e-mail address to your blacklist / unsubscribe list. Anybody added to the blacklist will never receive e-mails from CloudMail, even if they are added as a recipient. CloudMail will automatically add recipients to the blacklist if they use the unsubscribe link in an e-mail that they receive, so you only need to call this function if somebody requests to be unsubscribed without using the automatic unsubscribe link.


CMClearRecipients ( )

This clears all previously added recipients. This happens automatically when CMQueueMessage is called, but it's a good idea to always call this function before starting a new batch of recipients, just to make sure that you're not appending to some previous unsent email list.

Returns: 1 on success, 'ERROR' on failure.

CMDeleteResource ( url )

This deletes an item that was previously uploaded to Amazon S3 using the CMUploadResource function.


CMGetResultInfo ( columnName )

Call this function once for each piece of data that you want to retrieve about the activity record. The columnName parameter depends on what type of activity this is. Here is a list of valid column names for each type of activity:

columName -

CMIsProductionMode ( )

This function will return '0' if the SES account is in sandbox mode, or '1' if it is in production mode. An account that is in sandbox mode has low sending limits and can only be used to send to pre-verified e-mail addresses.


Returns the last Plugin-related error which occurred. This should be called any time that a plugin function returns "ERROR" to get a user-readable description of the error.

Returns: Error text, or "" if there was no error.

CMNextResult ( type )

Use this function to retrieve e-mail related activity. Call this function with the type of activity you're interested in, and it will either return a '0' indicating that there is no activity of that type, or a '1' indicating that there is activity of that type. If a '1' is returned, then use the CMGetResultInfo function to retrieve the details for that activity, and then continue calling this function until it returns a '0', indicating that there are no more activity records of this type at this time. Email activity can be retrieved up to 14 days after the activity occurs, and after that, it will be lost.

type - The type of activity to retrieve. This can be 'unsubscribe', 'view', 'click', 'delivery', 'complaint', or 'bounce'

CMQueueMessage ( htmlMessage; plainTextMessage; subject; fromAddress; campaignName {; options...} )

This function will send an e-mail message to each recipient added using the CMAddRecipient function. Insert the word [UNSUBSCRIBE] in the place where you want CloudMail to insert an unsubscribe URL.

You can specify options in the form "key=value" to access advanced configuration options. Currently, the only supported option is "dnsName=yourserver.yourdomain.com", which will cause the specified DNS name to be used for all clickable links in the e-mail.

htmlMessage - The HTML version of your message should be specified in this parameter. You may leave this empty to send a plain text only message, but CloudMail will not be able to tell whether an e-mail was viewed.
plainTextMessage - The plain text version of your message should be specified in this parameter. Some e-mail clients (very few) which do not support HTML messages will display the plain text version instead.
subject - The subject of your message.
fromAddress - The validated e-mail address to send from. You can validate e-mails using the SES section of the AWS Web Console. If you send an e-mail using an unvalidated from address, CloudMail will cancel the message and automatically send a validation e-mail to your from address.
campaignName - You can specify any name or ID that you want here. This name or ID will be stamped on all activity results.
sendDate - This parameter is not currently supported. A future update to the plug-in will support scheduled e-mail delivery.
options - See documentation above for more info about this parameter.
Returns: '1' on success, or 'ERROR' in case of an error.

CMRegister ( licenseKey; registeredTo )

Registers the plugin with the licenseKey provided.

licenseKey - The encrypted license key.
registeredTo - the company name for the license key used.
Returns: 1 on success, or "ERROR" on failure.

CMRemoveFromBlackList ( emailAddress )

This removes email addresses from the blacklist so that CloudMail will resume sending e-mails to them in the future.


CMSetAmazonCredentials ( accessKey; secretKey )

Call this function before you call any other e-mail sending-related functions. This will validate that your AWS credentials are correct, and will then start an EC2 t2.micro instance running (if it is not already running).

Returns: A status message showing the IP address of the CloudMail server at EC2.

CMSetErrorCapture ( isErrorCaptureEnabled )

Toggles error dialogs on or off. When something unexpected happens, the plug-in will pop up a dialog displaying the error message. This makes it easy to see what went wrong. However, in some cases, you (the developer) may prefer to show your own message to the user, or possibly not show a message at all. In that case, you can call CMSetErrorCapture with a parameter of true. That will suppress the error dialog from appearing to the user.

errorCapture - set to true to suppress the default popups.

CMSetUnsubscribeTemplates ( unsubscribeHtmlTemplate )

This function is not implemented yet, but will added in a future update to allow you to use your own custom HTML template for the unsubscribe page.


CMUploadResource ( resourcePathOrContainer; uploadName )

This function allows you to upload resources such as graphics, PDF files, or other file types that can then be hyperlinked to your e-mail message. Be aware that anybody can download any resource if they know the name of the file, so if you are using this for confidential information, include random characters as part of the uploadName, so that it cannot be guessed. This will overwrite an existing resource if it has the same uploadName. You can include slashes in the uploadName to create a directory structure.

resource -
Returns: URL to resource


Returns the plug-in version number. You can check to see whether the plug-in is installed or not by checking to see if this function returns a '?' (which means it is not installed).