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 / Send email with attach...
Power Apps
Unanswered

Send email with attachment

(0) ShareShare
ReportReport
Posted on by 84

Hi everyone, 

 

I am having a problem trying to get my whole list of items to appear when I receive the email. I have been able to get one item from the purchase order attached in the email. The images will show the steps of how I was able to receive the one line item from the purchase order. If anyone knows how to send all the information from the Purchase Order to appear with the same info in the email. 

 

Thanks for all the help!

 

 

Best regards, 

Alexander Lagos

PApic.PNG
PApic01.PNG
PAemail.PNG
Categories:
I have the same question (0)
  • MB-02102022-0 Profile Picture
    Microsoft Employee on at

    To send all of your information, you'll want to concatenate all of the data into a single string and send it via the email body.

     

    To do this, you can either use the & operator or the concatenate functions: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-concatenate 

     

    If you want additional formatting, you can also include HTML tags in your email body. This forum post describes how you can do such advanced formatting: https://powerusers.microsoft.com/t5/General-Discussion/Useful-Features-of-PowerApps-12-Email-amp-Concat/m-p/4554#M2125

  • Pat_Wickramage Profile Picture
    126 on at

    Hi,

     

    Following is a simple code that I have used to send a formatted email.

     

    Office365.SendEmail("xxxx@xxxxx.com", "Reminder: ICT Device Received", "Please add the below item back to inventory, if its in working condition." & "
    Item: " & ThisItem.Item & "
    " & "Returned by: " & ThisItem.ReservedByName, {Importance:"Normal"}); Patch(Assets, ThisItem, {Returned:Now()}); Refresh(Assets)

     

    You can add any information in the email body as long as you know the relevant field name.

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Ajilakes,

     

    Do you want to format the Purchase Order info as a table and then embed it within an email (sent from your PowerApps app)?

     

    I agree with @mabolan and @Pat_Wickramage's thought almost.

     

    If you want to format the Purchase Order info as a table and then embed it within an email (sent from your PowerApps app), 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/

     

    I have made a test on my side, please take a try with the following formula:

     

    Office365.SendEmail(
    TextInput1.Text,
    "Our first PowerApps email",
    "<b>PROJECT NAME: </b>"&SelectedReport2.ProjectName&"<br>"&
    "<b>DEPARTMENT:</b>"&SelectedReport2.Department&"<br>"&
    "<b>DETE SUBMITTED:</b>"&SelectedReport2.DateSubmitted&"<br>"&
    ...
    )

     

     

    Best regards,

    Kris

     

  • Ajilakes Profile Picture
    84 on at

    Hi Kris,

     

    I was able to get the information on the email, but the formatting is a bit off. Would you be able to help me out with this? I have attached two images showing the email and the coding. 

     

    Look forward to your response, 

     

    Best regards,

    AL

    PApic02.PNG
    PAcode.PNG
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey Pat, do you know if it is possible to send e-mail using the office 365, adding an attatchment + using a html text box on the same e-mail?

     

    I am trying to do it!

    The code for the HTML text box is this.
    "Office365.SendEmail("alexandre.choski@hotmail.com";
    "Análise/Fechamento de Impacto CTD - " & Card_Ativo.Text &" " & Card_Prefixo.Text & " " & Card_SB.Text ; HTML_Analise.HtmlText ;
    {IsHtml: true })"


    "And the code for the image using the add image control is this:
    Office365.SendEmail("alexandre.choski@hotmail.com" ;
    "Test Image" ;
    "test image" ;
    {Attachments:Table({Name:"Anexo.jpg";
    ContentBytes: Imagem_Analise.Image ; '@odata.type':""})})"

     

    I cant find a solution to get together those two codes...im get an error of limit expected and something like that 😞

  • Pat_Wickramage Profile Picture
    126 on at

    As far as I know (may be I am wrong) you cannot send attachments.

    @v-xida-msftcan confirm this one.

     

    With regard to your mail format, I don't think HTML code are working inside the " ".

    Coz Powerapps thinks its a text.

     

    You can use " and & to do the line formatting.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Im getting the HTML codes from a HTML text box, this is working perfectly.

    Im searching a method to get together the HTML Text box plus the Image Attatched in the same office 365 e-mail using one code 😜

     

    I can do both separately but not together hahaha

     

  • Pat_Wickramage Profile Picture
    126 on at

    Hi @Anonymous

     

    I am replying to the original post mate 🙂

     

    HTML code obviously works in HTML text box 🙂

     

    Good luck with your task.

    Let us know if you find a solution.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard