How to reply recived email in Node-Red

I want to reply received email in Node-Red. I was able to read email & send new mail to the sender using node-red-node-email. But the sender see that as a new email. But I want to send it as reply instead of new email.

Thank you

Welcome to the forum @iotgroup04

I haven't done it but you could try setting msg.replyTo instead of msg.to, which is mentioned in the help text.

1 Like

I tried it. When I remove the msg.to & add msg.replyTo it showd me a error "Error: No recipients defined"

Ah yes, you are right, that is telling it what to put in the replyTo field of the message it sends.

Sorry, I don't know how to do what you want.

I'm not 100% sure these are passed through so use debug nodes set to show complete message to fully inspect the msg object that comes from the email in node. If you see something like msg.messageId...

Set msg.inReplyTo of the reply email to the value of msg.messageId you get from the incoming email.

Also, you might need to adjust the subject & suffix it with "RE: "

2 Likes

Thank you very much @Steve-Mcl . It worked. There is a field as msg.header.message-id I put it into msg.inReplyTo & change the subject(msg.topic) as you said. Thanks again. If you can change msg.messageId to msg.header.message-id in your answer it will be helpful to future readers. I have accepted you comment as the answer.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.