cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Send email with attachment

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

8 REPLIES 8
Highlighted
Power Apps
Power Apps

Re: Send email with attachment

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-Con...

Highlighted
Helper III
Helper III

Re: Send email with attachment

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.

Highlighted
Community Support
Community Support

Re: Send email with attachment

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

 

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.
Highlighted
Advocate II
Advocate II

Re: Send email with attachment

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

Highlighted
Anonymous
Not applicable

Re: Send email with attachment

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 😞

Highlighted
Helper III
Helper III

Re: Send email with attachment

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.

Highlighted
Anonymous
Not applicable

Re: Send email with attachment

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

 

Highlighted
Helper III
Helper III

Re: Send email with attachment

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.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,319)