Accusoft will be performing a system upgrade from February 2-6, 2023. As a result, certain external services will be temporarily unavailable during that time.
For more detailed information, Click Here.
I have EML and MSG files that contain attachments. I want to combine the original EML/MSG document with each of its attachments into a single PDF. How can I do this?
To do this you are going to need to create a viewing session for the EML or MSG file. Once you’ve created the viewing session you can get the viewingSessionIds of the attachments. Once you have the viewingSessionIds you can get the workFile ID associated with each viewing session. With the workfile IDs you can use the Content Conversion Service (CCS) to combine the email with its attachments into a single PDF.
Use the following API requests to do this:
Create a new viewing session with:
This will give you a viewingSessionId which will be used in future requests.
The body for this request will be JSON:
Upload the document with:
The request body must be bytes of the source document. Make sure to include the FileExtension or PrizmDoc won’t be able to detect the file as an EML or MSG file.
Poll for and get the viewingSessionIds of the attachments with:
This will return the viewingSessionIds for each of the attachments.
Get the workfile ID for each of the viewing sessions with:
You’ll need to get a fileId for each attachment’s viewingSession and the email’s viewingSession.
With those workfile IDs, you can use the Content Conversion Service (CCS) to combine each of the workfiles with:
The body for this request will be JSON and need to include the workfileId for each of the attachments and the email itself. The body would look like this:
This will return a processId that you can poll using:
Once the process is complete, the request will return a results array that will contain the fileId of the final document.
You can get the final document that contains all the attachments and original EML/MSG file combined into a single PDF with: