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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Formatting the text sent using SendEmailV2

(0) ShareShare
ReportReport
Posted on by 986

Hi,
I was using SendEmailV2 connector to send emails to user (for new user registering on the application), for which the expression was :

Sidhant_02_0-1676447718148.png

But I did not get the data in proper format which was:
Hi User_name,
You have successfully registered in Application name
Here is the app link: Link (using <ahref> tag)

Regards,
App Team

This is an auto generated email please do not reply back

What I got:

Sidhant_02_1-1676447885156.png

 




Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    151,903 Most Valuable Professional on at
    Re: Formatting the text sent using SendEmailV2

    Hi @Sidhant_02 ,

    Use (get rid of the spaces) - instead of <a href = ')

    <a href='powerappsref'>Link here</a>

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • Sidhant_02 Profile Picture
    986 on at
    Re: Formatting the text sent using SendEmailV2

    Hi @WarrenBelz ,
    I did not get your reply: Use (get rid of the spaces) - instead of <a href = )
    Also before giving the link I wanted to display a text Here is the application link : www.google.com Click Here
    And to go to new line what should be used as after trying to use <br> it was highlighted as error

    Sidhant_02_0-1676451351830.png

    When I used the same code in RichText I got :

    Sidhant_02_1-1676452400971.png

     

  • WarrenBelz Profile Picture
    151,903 Most Valuable Professional on at
    Re: Formatting the text sent using SendEmailV2

    @Sidhant_02 ,

    You have not closed the quotes " here

    WarrenBelz_1-1676452888518.png

    but you can actually just end the lot like this

    </a><br>Regards,<br>"

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

     

  • Sidhant_02 Profile Picture
    986 on at
    Re: Formatting the text sent using SendEmailV2

    Office365Outlook.SendEmail(TextInput5_1.Text,gblAppName.ApplicationName,"Hi "&TextInput5.Text& "<br>"&
    " Your account has been created  successfully in " &gblAppName.ApplicationName& "<br>" &
    "Here is the Application Link: <a href = 'https://apps.powerapps.com/play/e/default-ed760a8d-0861-496b-8b75-d21b16292902/a/0ee6b407-c78a-449e-a1b1-4853c84e47b1?tenantId=ed760a8d-0861-496b-8b75-d21b16292902'> Click Here </a><br>Regards,<br>"
    &gblAppName.ApplicationName& "Team"& "<br>"& "<div style=""font-family: Calibri, sans-serif; font-size:8px;"">" &
    "This is an autogenerated email please do not reply back"  &
    "</div>"
    Like this but the issue is the <br> tag ahref also are getting displayed in raw format (as shown above)

    Sidhant_02_0-1676453489913.png

     

  • Verified answer
    timl Profile Picture
    35,811 Super User 2025 Season 2 on at
    Re: Formatting the text sent using SendEmailV2

    Hi @Sidhant_02 

    It looks like you're calling Office365.SendEmail (the orginal version), which defaults to plain text unless you specify the argument to send messages in HTML. This would explain the unescaped text you're seeing in your message.

    I'd suggest that you call version 2 of this, which will default to HTML.

    Office365Outlook.SendEmailV2(TextInput5_1.Text, 
     gblAppName.ApplicationName, 
     [InsertYourExistingMessageTextHere]
    )
  • Sidhant_02 Profile Picture
    986 on at
    Re: Formatting the text sent using SendEmailV2

    Hi @timl ,
    Thanks for the suggestion to use SendEmailV2, I got the following:

    Sidhant_02_0-1676453907163.png
    OnClick of the link I was getting this:

    Sidhant_02_1-1676454551976.png

    Why is it showing Disconnect?. I had copied the link by Going to Apps-> Choose my App->Clicked on 3 dots-Details->Copied the App link and used it.

    So if use SendEmail (normal one) then whatever content I give will be shown in the same way right?
    For example if I want the mail format in:
    Hi User_name,
    You have successfully registered in Application name
    Here is the app link: Link (using <ahref> tag)

    Regards,
    App Team

    This is an auto generated email please do not reply back

    Will the below expression give similar o/p as above:
    Office365Outlook.SendEmailV2(TextInput5_1.Text,gblAppName.ApplicationName,"Hi "&TextInput5.Text
    &"Your Account has been successfully created in: "&gblAppName.ApplicationName&
    "Here is the application Link: " &(link)&
    "Regards, "
    &gblAppName.ApplicationName& "Team"

  • WarrenBelz Profile Picture
    151,903 Most Valuable Professional on at
    Re: Formatting the text sent using SendEmailV2

    @timl ,

    Well done - at times you look for the complex rather than the simple . . .

  • Sidhant_02 Profile Picture
    986 on at
    Re: Formatting the text sent using SendEmailV2

    Yes, I agree the title of this Question is SenEmailV2 and in the application I used SendEmail with HTML code 😉

  • timl Profile Picture
    35,811 Super User 2025 Season 2 on at
    Re: Formatting the text sent using SendEmailV2

    Hi @Sidhant_02 

    The "disconnect" error message is normally related to authentication.

    If you were to completely log out of Power Apps on your browser and click the link on the email, you might find that it'll work. Otherwise, clearing browser cookies would be the other thing to try.

  • Sidhant_02 Profile Picture
    986 on at
    Re: Formatting the text sent using SendEmailV2

    Hi @timl and @WarrenBelz ,
    I just wanted to ask that currently I am sending an email to the new user that their account is created in the application, in the same way, I want to notify the admin that a new user has registered in the application, so how can I retrieve the admin's email from the SharePoint list and notify them

    Sidhant_02_0-1676957311331.png

    This is the sharepointlist
    And I want to include the users whose role admin and send an email notifying about new users:

    Sidhant_02_1-1676957396878.png

     

    Sidhant_02_2-1676957414397.png

    Want to send a similar email only the name would change and some of the content. Any idea on how to do it?

    Regards,
    Sidhant

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 624 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 384 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 246

Last 30 days Overall leaderboard