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 / How do I add my data t...
Power Apps
Answered

How do I add my data to the body of the email

(0) ShareShare
ReportReport
Posted on by 32

Hello, I'm looking to launch an email without sending it. that way I can add a pdf and send myself. It should include data from the app field (items). 

 

I found online code that works perfectly except that I cannot figure out how to insert my field name (items) into the body so that it will include it in the email.

 

I put an icon on my detailscreen with the below code.  Hoping someone can point me in the right direction so I can insert my "items" data into the body of the email.  

thanks 🙂

 

 

Launch(Concatenate("mailto:xxxxxxx@gmail.com?subject=Purchase Order","&cc=","xxxxxxxxx@gmail.com","&body=","this is my message", "%0A%0A"))

 

 

Categories:
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Try to use OutlookOffice365 connector, it is more intuitive that way.

     

     

    Sending an email with attachments will be a lit bit challenging.

     

    Hope it helps !

  • dannyshane Profile Picture
    32 on at

    Thanks,

    I've tried with that initially but there is no way to launch an email.   that method only sends the email. 

    unless you know of a way using office365 connector to launch the email window dialog? 

     

    because "launch" will open a new email message already populated, and then i can just do whataver (add attachment, etc) and press send 

     

     

     

  • Max44 Profile Picture
    223 on at

    Attach a file to a message On the File menu, click New, and then click Mail Message. On the Message tab, in the Include group, click Attach File. In the Insert File dialog box, browse to and choose the file that you want to attach, and then click Insert.

  • Verified answer
    WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @dannyshane ,

    I just did a test this end and the following works fine

    Launch(
     "mailto:xxxxxxx@gmail.com?subject=Purchase Order&cc=" & 
     "xxxxxxxxx@gmail.com" &
     "&body=" & 
     "Your set message content " & char(10) & //line break if required
     YourFieldDynamicReference & // add your data fields in here
     "%0A%0A"
    )

    Happy to fine-tune further with your actual code if required.

     

    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.

  • dannyshane Profile Picture
    32 on at

    Hi @WarrenBelz 

     

    Thanks very much!  That did get my data into the message like I was looking to do.  I appreciate it. 

     

    Just one more follow up question.  The line break "char(10)" won't work for me. 

     

    I used: 

    Launch(
     "mailto:xxxxxxxxx@gmail.com?subject=Purchase Order&cc=" & 
     "xxxxxxxxx@gmail.com" &
     "&body=" & 
     "My message content " & char(10) & 
     "testing line break and dynamic data..." & DataCardValueItems & 
     "%0A%0A"
    )

     

    My results are all on a single line: 

     

    My message content testing line break and dynamic data...Test189NOC size 4X.Test188 size 2X.H502 size XL 

     

    Thanks for your time

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    HI @dannyshane ,

    My bad here should be as below

    Launch(
     "mailto:xxxxxxxxx@gmail.com?subject=Purchase Order&cc=" & 
     "xxxxxxxxx@gmail.com" &
     "&body=" & 
     "My message content <br>" & 
     "testing line break and dynamic data..." & DataCardValueItems & 
     "%0A%0A"
    )

     

    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.

  • dannyshane Profile Picture
    32 on at

    Thanks for your reply. 

    It didn't work for me.  

    I tried using the break every which way even if it looked illogical. 

    Do you think the "launch" function just doesn't allow it? 

     

    Attempt (1) "My message content <br> & "testing line break"

    It wouldn't launch. error stated: expected operator. We expect an operator like + and *

     

    Attempt (2) "My message content <br>" & "testing line break"

    didnt work. displayed the break in the email.

     

    Attempt (3) "My message content" <br> & "testing line break"

    error. invalid argument type. expecting a number.

     

    Attempt (4) "My message content" & <br> & "testing line break"

    wouldn't launch. error stated: expected operator. We expect an operator like + and *

     

     

  • WarrenBelz Profile Picture
    156,921 Most Valuable Professional on at

    Hi @dannyshane ,

    Some testing shows what you have found - neither work. I did some searching and tried a few other things, but none worked.

    It seems the Mailto: function simply fires over text to Outlook.

    If I have answered your original post question, please Accept as Solution so others can find it more readily. It also closes the item.

     

  • dannyshane Profile Picture
    32 on at

    Thanks and I appreciate your time and all of your help. 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard