I want to use a ui_form to insert my email address and when I click on the "submit" button the address mentioned will be transferred to the "mail" node but I cannot recover this address with the msg.payload
As the info sidebar help for the email node says
msg.payload as an email, with a subject of
The default message recipient can be configured in the node, if it is left blank it should be set using the
msg.to property of the incoming message. If left blank you can also specify any or all of:
msg.headers , or
so you need to use a change node to move the payload from the form to the to field.
Hello, thanks for your response
I tried with a node red : function but I couldn't, do you have an example please?
Maybe a change node like this
Or a function like this
msg.to = msg.payload; msg.payload = "hello world"; return msg;
I left (To) empty in email node, and I put exactly the same function as you but it tells me an error Error: No recipients defined
I also tried change mode exactly like you and I had the same error
I think that’s because the msg.paylod has name: address of ui_form !!
Well add a debug after the form node to see what the payload properties are...
It may be that you need
msg.payload.something where something is whatever you called the "Votre email" field.
Thank You !
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.