Send email assertion as MIME
search cancel

Send email assertion as MIME

book

Article ID: 225505

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

The goal is to send an attachment using the Send Email assertion with MIMEs. There's an error when setting MIMEs in a context variable. Any idea what this error means and what is required to send the contents of the file as an attachment with MIME?

ERROR: Invalid Email attachment; Unable to extract attachment name from the MimePart: Invalid or empty Content-Disposition header

Environment

API Gateway: 10.0 1.0.1

Cause

The Content-Disposition header is missing.

Resolution

This header needs to be added for each section that you want an attachment for:

Make sure you check off the 'Mime Part(s) Variable checkbox is checked:

When the service is executed, an email is sent with two attachments:

Additional Information

A sample policy has been provided.

Attachments

1633521846756__sendEmailwithMIME.xml get_app