cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ajilakes
Level: Powered On

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
PowerApps Staff mabolan
PowerApps Staff

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

Pat_Wickramage
Level: Powered On

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.

Community Support Team
Community Support Team

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.
Ajilakes
Level: Powered On

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 Smiley Sad

Pat_Wickramage
Level: Powered On

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.

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 ;P

 

I can do both separately but not together hahaha

 

Pat_Wickramage
Level: Powered On

Re: Send email with attachment

Hi @Anonymous

 

I am replying to the original post mate Smiley Happy

 

HTML code obviously works in HTML text box Smiley Happy

 

Good luck with your task.

Let us know if you find a solution.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 151 members 4,290 guests
Please welcome our newest community members: