cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lanae_Hausen
Frequent Visitor

Launch Action with BCC and HTML Body

I'm trying to launch an email from PowerApps and running into issues with the BCC line and HTML Body.

 

Below is my code:

 

Launch("mailto:" & (PAmailToValue) & "&cc=" & (PAmailCCValue) & "&bcc=" & (PAmailBCCValue) & "&subject="UL Documentation for Project " & (PAProjectNumberValue.Text) & ", File Number " & (PAFileNumberValue.Text) & "&body=" & (PAEmailMessageBody.HtmlText), {IsHtml: true})

 

However, the &bcc= code is showing in the actual CC line in the generated outlook email instead of showing the value of the BCC in the bcc line.

 

The Body is also only generating with the first 2 lines of the actual text and also showing in HTML format instead of plain text in the generated email.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Lanae_Hausen ,

Based on the formula that you mentioned, I think there is something wrong with it. The standard format of "mailto" protocol as below:

mailto:user@example.com?subject=Message Title&body=Message Content&cc=User1@email.com&bcc=User@email.com

The first name-value pair after that the email address should be prefixed by a "?" rather than '&' . In addition, there is something wrong with the subject name-value pair. So please modify your formula as below:

Launch(
        "mailto:" & (PAmailToValue) & 
        "?cc=" & (PAmailCCValue) &   // modify formula here
        "&bcc=" & (PAmailBCCValue) & 
        "&subject=UL Documentation for Project " & (PAProjectNumberValue.Text) & ", File Number " & (PAFileNumberValue.Text) & // modify formula here
        "&body=" & (PAEmailMessageBody.HtmlText)
)

More details about the mailto protocol, please check the following article:

https://docs.microsoft.com/en-us/previous-versions/aa767737(v%3Dvs.85)

 

In addition, if you want to render the HTML Tag within the email body generated using 'mailto' protocol, I afraid that there is no way to achieve your needs currently.

 

If you would like this feature to be added, please consider submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

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.

View solution in original post

2 REPLIES 2
Eelman
Community Champion
Community Champion

@Lanae_Hausen 

I was able to add BCC using your code structure, see below.

LaunchEmail with HTML.jpg

 

Maybe check that all your variables are type Text and setup correctly?

 

Re the HTML in the Body of the email, I don't think it's currently possible according to this post. I also tried a few things that didn't work, eg

- set {IsHtml: false} as well as {IsHtml: true}

- put an HtmlText control in an app and set the text up similar to this post, then used 

 

Launch(HtmlText1.HtmlText, {IsHtml: false})
// and
Launch(HtmlText1.HtmlText, {IsHtml: true})

 

 

You could always save the Html as a file and insert it as rendered Html like this, but that may not work for you?

 

 

 

v-xida-msft
Community Support
Community Support

Hi @Lanae_Hausen ,

Based on the formula that you mentioned, I think there is something wrong with it. The standard format of "mailto" protocol as below:

mailto:user@example.com?subject=Message Title&body=Message Content&cc=User1@email.com&bcc=User@email.com

The first name-value pair after that the email address should be prefixed by a "?" rather than '&' . In addition, there is something wrong with the subject name-value pair. So please modify your formula as below:

Launch(
        "mailto:" & (PAmailToValue) & 
        "?cc=" & (PAmailCCValue) &   // modify formula here
        "&bcc=" & (PAmailBCCValue) & 
        "&subject=UL Documentation for Project " & (PAProjectNumberValue.Text) & ", File Number " & (PAFileNumberValue.Text) & // modify formula here
        "&body=" & (PAEmailMessageBody.HtmlText)
)

More details about the mailto protocol, please check the following article:

https://docs.microsoft.com/en-us/previous-versions/aa767737(v%3Dvs.85)

 

In addition, if you want to render the HTML Tag within the email body generated using 'mailto' protocol, I afraid that there is no way to achieve your needs currently.

 

If you would like this feature to be added, please consider submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

 

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,707)