Attachments

Attachments are passed in to MessageGears using URLs. Up to five files can be attached to a message. Each attachment has three possible values as specified below. Each field must have a suffix which indicates which attachment number it represents (1 through 5).

Field Name Description
AttachmentUrl.n If this field is present, the file will be retrieved and attached to the message(s) generated by the API call. Exactly one of AttachmentUrl or AttachmentContent must be provided for an attachment. Refer the the documentation regarding referencing remote file for more information.
AttachmentContent.n If this field is present, the file has been provided to the API call in the form of a base-64 encoded string. Exactly one of AttachmentUrl or AttachmentContent must be provided for an attachment.
AttachmentName.n This is a required field (if a url is specified above) and is used to give a friendly name for the attachment.
AttachmentContentType.n This is also a required field (if a url is specified above) and is used to help the email client associate an application with the attached file (e.q. Excel will launch and load the attached file when the recipient double-clicks on the attachment). Some common context types are:

  • application/pdf
  • image/jpeg
  • text/plain
  • application/msword

Click here for a list of commonly used content-types.