EMAIL node: How to suppress prepending "Re: " to outgoing messages

I wonder if someone can point me in the right direction please?

I am using 2 email nodes, one to send the other receive. The purpose of the flow is to allow me to send an email remotely to NR which triggers another email containing a status report.

The flow is working brilliantly with one minor niggle - it prepends "Re: " to the Header of the message.

When the receive node polls the Gmail server, it checks the Sender is valid [ my email address ] and then triggers another chain of nodes which prepare the Body of the message containing the remote data I wish to be reported and then sends as an email.

Other than using the msg.from value to compare incoming email address is valid as a conditional function, there is no other specific reference to the incoming mail, yet it thinks it is 'replying' specifically to an incoming message.

Is there a way to suppress the "Re: " part?

I have trawled and found nothing and ChatGPT is next to useless!

Any ideas would be very welcome.

Do you send msg.topic in the msg going to the email node?

What version of NR are you running? (you can find this in the startup log)
What version is the email node? (go to the sidebar, choose 'Manage Palette')
Have you tried to send it to a non gmail account to see if gmail is adding the 're:'?

When I send an email to my non gmail account, I do not get 'Re:' in the email:
Screenshot 2023-09-10 at 7.27.42 AM

Thanks for the info.

Yes, I use msg.topic to load the Header text. Both NR and the nodes are all up to date.

Interestingly I don't get the 'Re: ' if I just trigger the send-via-Gmail node manually, with the same header and body values set using msg.topic and msg.payload, repectively - everything is fine.

However if trigger by polling Gmail with the mail-in node, then using a function to conditionally trigger the send node, it prepends the "Re: "

I must add that I am neither forwarding nor replying to the incoming message - it is purely being used as a trigger. In fact I am currently using 2 separate Gmail accounts for receive and send.

Still trying to get other SMTPs to work but having some problems. I will keep trying.

I shall have to have a ponder, or just put up with the 'Re: ' ......


Without seeing your flow it is hard to know what is happening. I would suggest you add a debug node (set to display the complete msg object) to the output of the node feeding the mail-out node and see what it shows.

If you use an incoming mail to trigger it then you probably have some extra message properties - specifically in this instance msg.header.message-id - which if present triggers the addition of "Re:" as if it was a reply or forwarding on... so just delete that property and you should be sorted.

1 Like

I always have a generous sprinkle of Debug nodes when I'm developing and indeed had already set one to monitor msg.topic to see if anything was being added to the header at that stage.

I am pleased to report that dceejay was spot on with his pointer to msg.header.message-id

Many thanks for your kind asssitance!

That is brilliant dceejay.

Detecting and deleting msg.header.message-id appears to have solved the problem!

Many thanks for your kind assistance. So much to learn and such little time!


For the benefit of anyone stumbling across this in the future, the following was added to a function node

 // Check if msg.header is defined before trying to delete msg.header.message-id
if (msg.header && msg.header['message-id']) {
    delete msg.header['message-id'];

FYI, you could also do this in a change node:
Screenshot 2023-09-11 at 4.26.10 AM

Brilliant! Sincere thanks - again!

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