Skip to content

send MessageID to FES for easier threading of conversations on Gmail #4269

Description

@tomholub

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 class MessageUploadRequest(
   val associateReplyToken: String,
   val expiration: Instant?,
   val from: String,
   val to: List<String>,
   val cc: List<String> = emptyList(),
   val bcc: List<String> = emptyList(),
   val emailGatewayMessageId: 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 class MessageGatewayUpdateRequest(
   val emailGatewayMessageId: String,
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions