# Define msg.cc for node-red-contrib-email-out

**URL:** <https://discourse.nodered.org/t/define-msg-cc-for-node-red-contrib-email-out/47634>\
**Category:** General\
**Created:** [25 June 2021 08:33 UTC](https://discourse.nodered.org/t/define-msg-cc-for-node-red-contrib-email-out/47634 "2021-06-25T08:33:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![UweG](https://avatars.discourse-cdn.com/v4/letter/u/e495f1/32.png) [@UweG](https://discourse.nodered.org/u/UweG)\
**Post date:** [25 June 2021 08:33 UTC](https://discourse.nodered.org/t/define-msg-cc-for-node-red-contrib-email-out/47634/1 "2021-06-25T08:33:27Z")

</div>

I am trying to create a cc in NodeRed to send mail.

My attempt:

msg.to = msg.MailDaten.An;  
**msg.cc = "[Test1Mail@gmx.net](mailto:Test1Mail@gmx.net),Test2Mail@gmx.net"**;  
msg.topic = msg.MailDaten.Betreff;  
msg.attachments = msg.payload;  
msg.text = msg.MailDaten.InhaltText;  
msg.html = msg.MailDaten.InhaltHTML;  
return msg;

does not work.  
I receive the mail but no cc is sent.

How must the msg.cc be defined so that the MailSend-Node accepts it?

Thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [25 June 2021 10:08 UTC](https://discourse.nodered.org/t/define-msg-cc-for-node-red-contrib-email-out/47634/2 "2021-06-25T10:08:30Z")

</div>

that looks ok to me - it should be a comma separated string of valid email addresses.  
(as usual works fine for me...)

---

<div class="post-metadata">

**Author:** ![UweG](https://avatars.discourse-cdn.com/v4/letter/u/e495f1/32.png) [@UweG](https://discourse.nodered.org/u/UweG)\
**Post date:** [25 June 2021 10:55 UTC](https://discourse.nodered.org/t/define-msg-cc-for-node-red-contrib-email-out/47634/3 "2021-06-25T10:55:14Z")

</div>

Hi dceejay  
Thank's for your answer.  
Can you show me how you define msg.cc with an example of 2 fiction eMail adresses.  
The way i do does not work and i use valid email addresses.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 June 2021 11:07 UTC](https://discourse.nodered.org/t/define-msg-cc-for-node-red-contrib-email-out/47634/4 "2021-06-25T11:07:01Z")

</div>

Feed the message you are sending to the email node into a debug node set to output Complete Message and see what it shows.

---

<div class="post-metadata">

**Author:** ![UweG](https://avatars.discourse-cdn.com/v4/letter/u/e495f1/32.png) [@UweG](https://discourse.nodered.org/u/UweG)\
**Post date:** [26 June 2021 00:57 UTC](https://discourse.nodered.org/t/define-msg-cc-for-node-red-contrib-email-out/47634/5 "2021-06-26T00:57:43Z")

</div>

Hi Colin.  
I did this und the message shows:  
 ![Bildschirmfoto 2021-06-26 um 02.44.01](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/c/7c792ec737b37396f66c2b1a3ecba32db3358094.png)  
But the sendmail-node did not use it and only takes the defined msg.to. No cc was sent.

---

<div class="post-metadata">

**Author:** ![UweG](https://avatars.discourse-cdn.com/v4/letter/u/e495f1/32.png) [@UweG](https://discourse.nodered.org/u/UweG)\
**Post date:** [26 June 2021 02:54 UTC](https://discourse.nodered.org/t/define-msg-cc-for-node-red-contrib-email-out/47634/6 "2021-06-26T02:54:57Z")

</div>

Thank's for your help.  
I solved the problem.  
I write the to: Mailadresse direct in the Send Email Node.  
Then it does not accept cc and bcc.  
If you use msg.to and leave the node empty it works fine.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 June 2021 06:31 UTC](https://discourse.nodered.org/t/define-msg-cc-for-node-red-contrib-email-out/47634/7 "2021-06-26T06:31:57Z")

</div>

Ah right, yes that could be improved.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 August 2021 06:32 UTC](https://discourse.nodered.org/t/define-msg-cc-for-node-red-contrib-email-out/47634/8 "2021-08-25T06:32:56Z")

</div>

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