Roman - on FES we allowed two methods to supply message ID (the mime email header).
Option 1: pre-generate message id before constructing mime / uploading the message to Gmail, and include that in FES /upload call
Option 2: let Gmail generate message id (as it does now) and then retrieve it & send that to FES in another API request
Option 1 is preferred if it can be made to work (if Gmail respects message id constructed by us when we're sending the message) as it requires fewer API calls.
Pre-generate option:
- create a valid Message-ID - these should include the angled brackets.
- Send it along in the MessageUploadRequest class:
data classMessageUploadRequest(
valassociateReplyToken:String,
valexpiration:Instant?,
valfrom:String,
valto:List<String>,
valcc:List<String> = emptyList(),
valbcc:List<String> = emptyList(),
valemailGatewayMessageId:String? = null
)
Separate API request option:
- after sending the email retrieve the Message-ID.
- Send it to the new POST
/api/$VERSION_CLIENT/message/{externalId}/gateway endpoint.
Authorization is required and the class is:
data classMessageGatewayUpdateRequest(
valemailGatewayMessageId:String,
)
Roman - on FES we allowed two methods to supply message ID (the mime email header).
Option 1: pre-generate message id before constructing mime / uploading the message to Gmail, and include that in FES /upload call
Option 2: let Gmail generate message id (as it does now) and then retrieve it & send that to FES in another API request
Option 1 is preferred if it can be made to work (if Gmail respects message id constructed by us when we're sending the message) as it requires fewer API calls.
Pre-generate option:
Separate API request option:
/api/$VERSION_CLIENT/message/{externalId}/gateway endpoint.
Authorization is required and the class is: