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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Modifying PowerApps Em...
Power Apps
Unanswered

Modifying PowerApps Email Template

(0) ShareShare
ReportReport
Posted on by 228

Objective: I am using the email template:

ShondaT_0-1694446801806.png

 

  • The "To" field of the email has to always go to a specific group email account; and 
  • I need to include a cc: as well that functions just like the current "To" Field functions in the template, and
  • Lastly, which has nothing to do with the code, I made the subject a dropdown, but I need to have a function that allows for fill-in as well. My thought is that I'd have a text box that would be visible if the user selected Other in the subject line.

 

How do I modify the current email template code that is applied to the send icon's OnSelect Property to achieve objectives 1 and 2. The default code is shown below. For Objective 3, is it a matter of using a Text Box with the visible property adjusted?

 

/*Create semicolon separated list of people to email, send the email, reset subject & message fields*/
Set(_emailRecipientString, Concat(MyPeople, Mail & ";"));

Office365Outlook.SendEmailV2(_emailRecipientString, TextEmailSubject2.SelectedText.Value, RTEBody.HtmlText, {Attachments: RenameColumns(Attach.Attachments, "Value", "ContentBytes"),Importance:"Normal"});
Reset(TextEmailSubject2);
Reset(RTEBody);
Clear(MyPeople); Navigate(SuccessEmailAlaCarte, ScreenTransition.Fade)

Categories:
I have the same question (0)
  • SpongYe Profile Picture
    5,603 Super User 2025 Season 2 on at

    Hi @ShondaT 

     

    I assume that you mean with email template code you mean the Body of the email?!

    Based on the Office 365 Outlook connector the third parameter is the Body email. 

    Looking at your code RTEBody.HtmlText is the body of the email. 

     

    SpongYe_0-1694451024624.png

     


    ------------------------------------------------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

     

     

  • ShondaT Profile Picture
    228 on at

    @SpongYe  I don't think what you provided is what I'm after. My post may not have communicated my intention appropriately, so I revised it. If you could provide assistance after re-reading my post it would be greatly appreciated.

  • Verified answer
    ShondaT Profile Picture
    228 on at

    I resolved the issue with the help of ChatGPT. I must be getting better at posing questions to that thing.

     

    Below is the code that allows me to do everything I needed to do on send with the email template form.

     

    /*Create semicolon separated list of people to email, send the email, reset subject & message fields*/
    Set(_emailRecipientString, Concat(MyPeople, Mail & ";"));

    Office365Outlook.SendEmailV2(
    "NorCalExecutiveSupport@mossadams.com", // Set the "To" address
    If(
    TextEmailSubject2.Selected.Value = "Other",
    TextInput2.Text, // Use the text from the Text Input control if "Other" is selected
    TextEmailSubject2.SelectedText.Value // Use the selected item from TextEmailSubject2
    ),
    RTEBody.HtmlText,
    {
    Attachments: RenameColumns(Attach.Attachments, "Value", "ContentBytes"),
    Importance: "Normal",
    Cc: _emailRecipientString // Use _emailRecipientString for the "Cc" field
    }
    );

    Reset(TextEmailSubject2);
    Reset(RTEBody);
    Clear(MyPeople);
    Navigate(SuccessEmailAlaCarte, ScreenTransition.Fade)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard