Currently, the Email Message codeunit allows reading attachment metadata (name, size, content type) and downloading content, but does NOT expose the underlying Tenant Media ID. This forces developers to use complex matching algorithms (size + timestamp + filename) to correlate email attachments with Tenant Media records.
Request: Add a method to the Email Message codeunit:
procedure Attachments_GetMediaId(): Guid
Alternatively, grant read access to the Email Message Attachment (8904) table, at least to the Attachment field that contains the Media reference, so that Tenant Media records can be linked to Sent Email Attachments.
This is particularly useful when developers need to display sent email attachments in factboxes, link them to document attachments, or perform post-send processing/cleanup on the underlying media records.
