cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kumar9024021
Helper V
Helper V

CC list doesnt gets populated, when email being recieved

I am sending email using below code. However, I notice that my cc list doesn't get populated, despite including it in code. I can only see the To field and not Cc field.

 

Office365Outlook.SendEmail(

    DataCardValue3.Text,

    "Approval”, 

“Please approve my request submitted on 13 Jan 2020",    {Cc:DataCardValue21.Selected.Email&";"&DataCardValue22.Selected.Email&";"&DataCardValue23.Selected.Email,IsHtml:true}

);

18 REPLIES 18
mdevaney
Super User III
Super User III

@Kumar9024021 

If you put this code in the Text property of a label does it show the expected CC string?

DataCardValue21.Selected.Email&";"&DataCardValue22.Selected.Email&";"&DataCardValue23.Selected.Email

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Yes, it shows the exact string with semicolon separated like below. Still I didn't receive the email with Cc field populated. It only populates the To Field

 

abc@abc.com;def@def.com;hij@hij.com

Hi,

 

I tried hardcoding an email address in the Cc field and can see Cc field populated correctly.

 

However, I just tried including one Cc field for testing rather than 3, still Cc field doesn't get populated.

 

Office365Outlook.SendEmail(

DataCardValue3.Text,

"Approval”,

“Please approve my request submitted on 13 Jan 2020", {Cc:DataCardValue21.Selected.Email,IsHtml:true}

);

 

My datacard is a Person or group column in SharePoint which is shown as Combobox in Powerapps. I see that the selected users are correctly populated in SharePoint, when i submit my newform.

 

However, OnSuccess of the form if i include DataCardValue21.Selected.Email, it doesn't get the exact email address it seems. Any inputs would be helpful. Thanks.

 

 

 

 

I even tried putting the Cc field into a label and in the SendMail function used label63.Text;

 

The string formed is correct, but somehow when email is being received, doesn't get Cc field.

Hi @PowerAddict , @yashag2255 

 

Somehow my Cc list doesn't get populated, where email address is from the Person or group field in SharePoint.

 

I can only see the To field and not Cc field.

 

Office365Outlook.SendEmail(

DataCardValue3.Text,

"Approval”,

“Please approve my request submitted on 13 Jan 2020", {Cc:DataCardValue21.Selected.Email&";"&DataCardValue22.Selected.Email&";"&DataCardValue23.Selected.Email,IsHtml:true}

);

 

I can see the above Cc field is correct, because when I tried putting in label, the string was perfect as below

abc@abc.com;def@def.com;hij@hij.com

 

I even tried replacing into Label.Text in Cc field and it still doesn't work. Any inputs would be helpful. Thanks.

Can anyone help me with the Powerapps SendEmail function where Cc field doesn't gets populated.

 

Office365Outlook.SendEmail(

DataCardValue3.Text,

"Approval”,

“Please approve my request submitted on 13 Jan 2020", {Cc:DataCardValue21.Selected.Email&";"&DataCardValue22.Selected.Email&";"&DataCardValue23.Selected.Email,IsHtml:true}

);

 

Syntax is perfect because when I put string DataCardValue21.Selected.Email&";"&DataCardValue22.Selected.Email&";"&DataCardValue23.Selected.Email in label, it shows correctly.

Hi @Kumar9024021 

 

I carried out a test on my side and seems like there is a double quotes mismatch in the editor. This might occur when you have copied the code from somewhere.
 
Office365Outlook.SendEmail(DataCardValue3.Text,"Approval","Please approve my request submitted on 13 Jan 2020",{Cc:DataCardValue21.Selected.Email&";"&DataCardValue22.Selected.Email&";"&DataCardValue23.Selected.Email&";",IsHtml:true});
 
Try to copy paste the code directly from my response as this one is tested by me and it works fine.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

Hi @yashag2255 ,

 

I tried the above. Still couldn't see cc. Is it because, I am saving only my Displayname in Person/Group column rather than email address in SharePoint.

 

Once I select my Person or group field value in Powerapps, displayname gets saved into SharePoint Person/Group field rather than email address ?

Is it necessary also to save email address in SharePoint in some other columns ?

Hi @Kumar9024021 

 

Can you share more details especially when you say that you have just saved Display name in the sharepoint column? Is this is a single line of text field? If so, then you can either create a separate column for Email or use Office365 connector to get the email address.

If it is a person type column, then it saves a record value with the email address even though you display only the name.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,012)