Reply to message gives Provider error

So in V2 application when we were replying to an email message, we were appending RE: before the subject so that we have the same behaviour as in the other email applications.

But now when i’m testing the v3 app and trying to reply to a message. it gives me the following error:

“subject does not match subject of message you are replying to”
the message to which i’m replying to has subject:

“Reply to Email Test”

When i’m replying to that email with subject
subject: ‘re: Reply to Email Test’

It gives me error.

Why the behaviour is different from v2 app in v3? and why it is different from normal email providers like gmail, outlook, yahoo

What can i do to fix this?

Using the following code of nodejs sdk:

export const sendEmailWithAttachments = async ({
grantId,
from,
fromName,
to,
subject,
text,
replyToMessageId,
files= [],
cc= [],
}: SendEmailParams) => {
console.log(`SendEmail with reply to: ${replyToMessageId}, subject: ${subject}`)

const filesToUpload=Array.isArray(files) ?files: [files]
const attachments:CreateAttachmentRequest[] = []
for (constfileoffilesToUpload) {
const base64=file.data.split("base64,")?.[1] ??""
const buffer=Buffer.from(base64, "base64")
const readableStream=newReadable({
read() {
this.push(buffer)
this.push(null) // End the stream
},
})

attachments.push({
content:readableStream,
filename:file.filename,
contentType:getContentType(file.filename),
size:file.size,
})
}

const message:SendMessageRequest= {
subject,
body:text,
to: [{ email:to }],
cc:cc.map((email) => ({ email })),
from: [{ email:from, name:fromName }],
...(replyToMessageId&& { replyToMessageId:replyToMessageId }),
trackingOptions: {
threadReplies:true,
opens:true,
},
attachments,
}

const sentMessage=awaitnylas.messages.send({
identifier:grantId,
requestBody:message,
})

return sentMessage.data
}

Hello @zeshanvirk I’m not well versed in Node, so let me try this on Python or Ruby and will get back to you…

Hi,

You should try this using Python.

Sorry, I drop the ball on this :frowning: This fails in Python as well…the thing is…if you’re replying to a message and want to keep the thread, you cannot modify the subject…the platform team is discussing whether this makes sense or not…

So far, I think we’re going to allow changing the subject but this haven’t been implemented yet…I will try to update this post when this happens…

Thanks for the updated @Blag

Also i noticed that, in Microsoft account, the subject is must to change, but in google it must be same. I didn’t get this rule why it even exists, whereas in v2, this was not the case. we were always changing subject to
RE: SUBJECT_HERE

And it was working with both microsoft and google accounts.

Please keep me posted about the updates.

I know :frowning: But I don’t make the rules…anyways…seems like we’re reverting back to the way V2 worked…so I will you posted :wink: