Email copy carbon (Cc)

I run SMTP email on my ESP8266 module. My code is based on an example file called Send Text which is part of ESP_Mail_Client library. The code runs very well. Now I want to add a Cc
filed and send a copy of it to another addressee but the library does not support it. Any ideas?

Send it again to the CC client.

addCc ?

It is possible and I could add the addressee to the To field but I wanted to make the IoT solution per a spec...

It is not supported by the smtp library.

Send the message to each recipient separately. Its automatically a BCC:

The "CC:" field in email happens only at the message text level (RFC822) - it's just part of the text you send in SMTP with the DATA command. At SMTP level (RFC5321), TO:, CC:, and BCC: all result in the same "RCPT TO:" protocol messages, which may or may not have anything to do with the text of the message (thus the ability to forge messages.)

Its not me who sends the emails. Its stand alone iot device

I am not to fully understand your explnation. What decleration should I use to set the cc addressee? n

message.addRecipient(F("Someone"), RECIPIENT_EMAIL);
message.addRecipient(F("Sometwo"), RECIPIENT_EMAIL);
message.addRecipient(F("Somethree"), RECIPIENT_EMAIL);

You can add as many as you want.
Leo..

What library are you using? If it is GitHub - mobizt/ESP-Mail-Client: The comprehensive Arduino Email Client Library to send and read Email for Arduino devices. The library also supports other network shields or modules e.g., Wi-Fi, Ethernet, and GSM/4G modules., then it looks like it supports message.addCc("email3");

Yes I use ESP_Mail_Client. Somehow I missed message.addCc . thank you so much for your help.

Thank you so much Leo. wetfw gave mmmmme the hint I was looking for.

An extra "message.addRecipient" with the sender email will also echo back the email.
I am using that right now, and it works.
Going to try "message.addCc" the next time I need to.
Leo..

message.addCc works well. Now i came to a point where i should add the code for receiving emails.

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