Receive error when sending multiple emails in test case

Document ID : KB000045752
Last Modified Date : 14/02/2018
Show Technical Document Details

Issue: 

A test use case in which we are planning to send multiple emails over a time interval. But the Use Case is failing with following error. 

============================================================================ 
| 

============================================================================ 
| Failed to send email, error message = The MimeMessage is already built. 
============================================================================ 
| Step: Send Email Step 
---------------------------------------------------------------------------- 
| Message: The MimeMessage is already built. 
---------------------------------------------------------------------------- 
| Trapped Exception: The MimeMessage is already built. 
| Trapped Message: java.lang.IllegalStateException: The MimeMessage is already built. 

 

Environment:  

DevTest 9.1

Cause: 

This occurs when you are using the Send Email step multiple times within a test case OR when you have an Send Email step in the test case and using multiple instances in the Staging Document

Resolution:

In the email asset, there is a “PRO” button at the top right corner. If you click that for an asset, you will see new field called “Scope”

 

Change the scope of the asset that you are using for the testcase to “Step”. This scope works for ITR and Staging with multiple (or 1) instances. This also lets you use same asset between 2 steps in a testcase.