web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sending message to mul...
Power Apps
Answered

Sending message to multiple email accounts

(0) ShareShare
ReportReport
Posted on by 318

Hi,

 

I have a requirement to send email and CC multiple users dynamically depending on the selected record.

 

I was trying the below code but I was getting an error as well. Any thoughts, please?

 

genarich_0-1636042199913.png

Office365Outlook.SendEmailV2(
 "XXX",
 "International Roaming for " & varRecord.Title,
 "<p><strong>Hi, </strong></p>
 <p>Travel request is approved. Please provide international roaming for " & varRecord.Title & ".</p>
 <p>Click <a href='" & appURL & "&ID=" & varRecord.ID & "'>here</a> to view the details.</p>",
 {
 Cc: cc,
 Bcc: admin; varRecord.'Created By'.Email,
 IsHtml: true,
 Importance: "Normal"
 }
 )

 

 

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @genarich 

    Actually, your error is that you are combining options for the SendEmail action with the SendEmailV2 action.

    IsHtml is not an option for SendEmailV2 as it automatically sends as HTML.

     

    So, that is a separate issue.  Your "XXX" part is where the recipient email addresses need to go. 

    I am guessing you "XXX"'ed that out for posting.

     

    I hope this is helpful for you.

  • genarich Profile Picture
    318 on at

    Yes, that's correct. I edited the XXX'ed for posting.

     

    Thank you for the info but are you saying that I could not combine multiple addresses for the CC/BCC but only for where the XXX is?

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @genarich 

    No, the Cc and Bcc option is valid with SendEmailV2, just not the IsHtml.  That is where the error is.

  • genarich Profile Picture
    318 on at

    I see. So if I switched it to SendEmail it will work?

     

    I tried removing the IsHtml but it didnt work.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @genarich 

    No, you definitely don't want to go to SendMail as it is a deprecated action.

     

    What error did you have when you removed the IsHtml??  Let's explore that issue.

  • Verified answer
    genarich Profile Picture
    318 on at

    Thank you!

     

    I think I figured it out. I passed a variable inside the CC instead, removed the IsHtml, and it worked!

     

    Set(cc,varRecord.'Created By'.Email & ";" & varRecord.'Traveler''s Email')

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @genarich 

    I couldn't tell from your picture what you had removed for privacy and what you had as real values.  I assumed you had that part correct.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard