360Works CloudMail Reference Documentation
WikiEditTask (Talk | contribs) m (Auto-upload documentation) |
WikiEditTask (Talk | contribs) m (Auto-upload documentation) |
||
Line 23: | Line 23: | ||
*[[#CMSetErrorCapture|CMSetErrorCapture]] ( isErrorCaptureEnabled ) — Toggles error dialogs on or off. | *[[#CMSetErrorCapture|CMSetErrorCapture]] ( isErrorCaptureEnabled ) — Toggles error dialogs on or off. | ||
*[[#CMSetUnsubscribeTemplates|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. | *[[#CMSetUnsubscribeTemplates|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|CMUploadResource]] ( resourcePathOrContainer ) — This function allows you to upload resources | + | *[[#CMUploadResource|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. | such as graphics, PDF files, or other file types that can then be hyperlinked to your e-mail message. | ||
*[[#CMVersion|CMVersion]] — Returns the plug-in version number. | *[[#CMVersion|CMVersion]] — Returns the plug-in version number. | ||
Line 154: | Line 154: | ||
<div id="CMUploadResource"></div> | <div id="CMUploadResource"></div> | ||
− | ==CMUploadResource ( resourcePathOrContainer ) == | + | ==CMUploadResource ( resourcePathOrContainer; uploadName ) == |
This function allows you to upload resources | 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. | 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 | 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 | + | 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 | + | This will overwrite an existing resource if it has the same uploadName. You can include slashes in the uploadName to create a directory structure. |
<div class="parameters"><strong>Parameters:</strong> | <div class="parameters"><strong>Parameters:</strong> |
Revision as of 17:00, 16 April 2015
360Works CloudMail User Guide
360Works CloudMail is a plug-in for sending outbound e-mail messages and monitoring e-mail interactions using Amazon Web Services.</p>
For a getting started guide, go to http://docs.360works.com</p>
360Works Plugin Setup Guides
See Plugins_101 for Error reporting, installation, registration, and more.
Function Summary
- CMAddRecipient ( recipient ) — Call this function once for each e-mail recipient before calling the EBQueueMessage function.
- CMAddToBlacklist ( address; date; campaignName ) — Use this function to manually add e-mail address to your blacklist / unsubscribe list.
- CMGetResultInfo ( columnName ) — Call this function once for each piece of data that you want to retrieve about the activity record.
- CMIsProductionMode ( ) — This function will return '0' if the SES account is in sandbox mode, or '1' if it is in production mode.
- CMLastError — Returns the last Plugin-related error which occurred.
- CMNextResult ( type ) — Use this function to retrieve e-mail related activity.
- CMQueueMessage ( htmlMessage; plainTextMessage; subject; fromAddress; campaignName; optionalSendDate {; options...} ) — This function will send an e-mail message to each recipient added using the EBAddRecipient function.
- CMRegister ( licenseKey; registeredTo ) — Registers the plugin with the licenseKey provided.
- CMRemoveFromBlackList ( emailAddress ) — This removes email addresses from the blacklist so that CloudMail will resume sending e-mails to them in the future.
- CMSetAmazonSetCredentials ( accessKey; secretKey ) — Call this function before you call any other e-mail sending-related functions.
- CMSetErrorCapture ( isErrorCaptureEnabled ) — Toggles error dialogs on or off.
- 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.
- CMVersion — Returns the plug-in version number.
Function Detail
CMAddRecipient ( recipient )
Call this function once for each e-mail recipient before calling the EBQueueMessage function. This list will be cleared out after EBQueueMessage 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.
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:
- delivery: "campaign", "source", "destination", "timestamp", "messageId", "processingTimeMillis", "smtpResponse", "reportingMTA"
- bounce: "campaign", "source", "destination", "timestamp", "messageId", "feedbackId", "bounceType", "bounceSubType"
- complaint: "campaign", "source", "destination", "timestamp", "messageId", "feedbackId", "complaintFeedbackType", "userAgent"
- unsubscribe: "campaign", "email", "timestamp", "messageId", "reason"
- view: "campaign", "email", "timestamp", "messageId", "ipAddress", "browserInfo"
- click: "campaign", "email", "timestamp", "messageId", "ipAddress", "browserInfo", "url"
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.
CMLastError
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.
""
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; optionalSendDate {; options...} )
This function will send an e-mail message to each recipient added using the EBAddRecipient function. Insert the word [UNSUBSCRIBE] in the place where you want CloudMail to insert an unsubscribe URL.
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
- 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.
CMRegister ( licenseKey; registeredTo )
Registers the plugin with the licenseKey provided.
licenseKey
- The encrypted license key.
registeredTo
- the company name for the license key used.
CMRemoveFromBlackList ( emailAddress )
This removes email addresses from the blacklist so that CloudMail will resume sending e-mails to them in the future.
CMSetAmazonSetCredentials ( 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).
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 SMSetErrorCapture
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
CMVersion
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).