cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Sending emails from an App

Trying to learn how to send an email from an app, upon hitting a Submit button.  I can get it to send, but cannot send to two recipients, one from User() (person creating or editing the record) and the other a set email address.  If I put in one or the other, it sends, but I can't get it to send to both.  

 

Also, any links/tips on how to make the email a bit nicer?  I guess I can build it with some HTML on the actual OnSelect button but is there a more 'elegant' way?  With Flows, perhaps?  (I do not know Flows at all, yet, but if this is my answer, I'm willing to dive in and learn.)  

 

Thanks as always!!! 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Sending emails from an App

Hi @CaroleKV ,

Could you please share a bit more about the formula you used within your app?

 

If you want to send an email to multiple recipients, the standard formula format as below:

Office365Outlook.SendEmail(
                           "User1@email.com;User2@email.com;User3@email.com", // Multiple email address should be separated with semicolon (;) within a single one string value
                           "Subject Text",
                           "Body Message",
                           {
                              IsHtml:true
                           }
)

On your side, you may need to type the following formula:

Office365Outlook.SendEmail(
                           User().Email & ";AnotherUser@email.com",
                           "Subject Text",
                           "Body Message",
                           {
                              IsHtml:true
                           }
)

 

In addition, if you want to make your email a bit nicer, I agree with you, I think the HTML Tag within the email body could achieve your needs. Please check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/html-email-reporting-with-tabular-data/

https://www.youtube.com/watch?v=xlZp0U7ZPBM

 

If you want to send a email using Power Automate flow, please check the following video resource:

https://www.youtube.com/watch?v=viwUxPmFarY

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Community Champion
Community Champion

Re: Sending emails from an App

Hi @CaroleKV ,

Firstly, I assume you are using Office365Outlook.SendEmail for doing this. In the To area, just put

User().Email & "; OtherAddress@whatever.com"

and it will send to both.

As far as making it nicer, yes HTML is the best way to do this. To make it easier, put a HTML text box (I will call it MailBody) - it can be on another screen  and set it out the way you want it to look. The advantage of this is that you can see exactly what is being sent. I actually put the email send button on this screen so the user can review the content and format. Then all you do in the Body area of the email send is

MailBody.HTMLText

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Highlighted
Community Support
Community Support

Re: Sending emails from an App

Hi @CaroleKV ,

Could you please share a bit more about the formula you used within your app?

 

If you want to send an email to multiple recipients, the standard formula format as below:

Office365Outlook.SendEmail(
                           "User1@email.com;User2@email.com;User3@email.com", // Multiple email address should be separated with semicolon (;) within a single one string value
                           "Subject Text",
                           "Body Message",
                           {
                              IsHtml:true
                           }
)

On your side, you may need to type the following formula:

Office365Outlook.SendEmail(
                           User().Email & ";AnotherUser@email.com",
                           "Subject Text",
                           "Body Message",
                           {
                              IsHtml:true
                           }
)

 

In addition, if you want to make your email a bit nicer, I agree with you, I think the HTML Tag within the email body could achieve your needs. Please check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/html-email-reporting-with-tabular-data/

https://www.youtube.com/watch?v=xlZp0U7ZPBM

 

If you want to send a email using Power Automate flow, please check the following video resource:

https://www.youtube.com/watch?v=viwUxPmFarY

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Community Champion
Community Champion

Re: Sending emails from an App

Thanks @v-xida-msft for confirming the logic of my post.

@CaroleKV , happy to continue to assist with your issue.

Highlighted
Helper III
Helper III

Re: Sending emails from an App

Thank you!  I am  going to try this a bit later as something else has come up I must work on first.  But I already see my (silly) mistake in sending the email to multiple parties.  For the prettier HTML email, I will give that a try after this week.  

 

And thank you as always!

Highlighted
Community Support
Community Support

Re: Sending emails from an App

Hi @CaroleKV ,

Please take a try with the solution I provided or @WarrenBelz  provided above, then check if the issue is solved.

 

If you have solved your problem, please consider go ahead to click "Accept as Solution" identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,271)