check to see if attachment exists in email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 04:46 PM
Hi folks,
just wondering if there is a way to check if any attachments exists in an email if the attachment size is greater than the default size, 18874368 bytes (limit glide.email.inbound.max_total_attachment_size_bytes)
if the attachment is excessive in size, it seems not to be attached to the sys_attachment table, but the email appears to come through.
I was wondering if in the email header or some property of the email could reveal the attachment details like name, size, or etc.
Any advice would be appreciated.
Kind regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 06:10 PM
This might be helpfull to you:
Administering Attachments - ServiceNow Wiki
You can also create an event on the warning of excessive attachment size and process the email

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2016 06:55 PM
Hi George,
In your Inbound Email Action script, you can check "email.headers" to see if it contains something like "X-MS-Has-Attach:".
The name of the attachment attribute listed in the headers may vary depending on what email system they came from. But if you have a list of standard attribute names (like the one above), you could reference them as a property in this way:
e.g., email.header.x-ms-has-attach
This will at least tell you whether or not the original email had attachments (i.e., if they got stripped)
-Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2016 03:07 PM
Thanks Brain, this reply is pretty much helpful, I am changing my Inbound action script to rectify this.
Your response is much appreciated.
Kind regards,
George

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2016 05:09 PM
You are very welcome.
-Brian