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

Send e-mail with image attachments from Sharepoint list..

Hi, 

 

My name is Marcus and I am pretty new to PowerApps.

 

I am trying to send emails with Office365.SendEmail using the script: Office365.SendEmail((User().Email & ";**My E-mail**," )&ccemailbox.Text&"","Order - " & Gallery1.Selected.'Site Name',HtmlText3.HtmlText,{IsHtml:true});

 

I have a list in Sharepoint with images stored and I want to send them as attachments to this e-mail. 

 

Could you give me any ideas? 

 

I am trying to create a collection with the images, but is not working.

 

Thank you

 

Regards

 

Marcus Ramos

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Send e-mail with image attachments from Sharepoint list..

Hi @marcusramos ,

Could you please share a bit more about the SP List with images that you mentioned?

Do you store the images in a SP Library or store images in a SP List?

 

If you want to send an email with attachments, please check and see if the following article would help in your scenario:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-office365-outloo...

 

If you want to send an email with multiple images files as attachments, please consider take a try with the following workaround:

1. Add a Gallery control (ImageGallery) in your app, connect it to your Images SP List, then add a Image control (Image1) in it to display image.

2. Set the OnSelect property of the "Send Email" button to following:

Office365.SendEmail(
                    (User().Email & ";**My E-mail**," )&ccemailbox.Text&"",
                    "Order - " & Gallery1.Selected.'Site Name',
                    HtmlText3.HtmlText,
                    {
                      IsHtml: true,
                      Attachments: ForAll(
                                          ImageGallery.AllItems,
                                          {
                                             Name: FileNameColumn,   // FileNameColumn is from your Image SP List
                                             ContentBytes: Image1.Image,   // Image1 is the Image control in the ImageGallery
                                             '@odata.type': ""
                                          }
                                   )
                    }
);

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

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.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Send e-mail with image attachments from Sharepoint list..

Hi Marcus,

 

There's a great thread that covers this here, and I think you will find it very useful: 

https://powerusers.microsoft.com/t5/Building-Power-Apps/send-image-via-email/td-p/103464

 

Cheers,

ManCat




Don't forget to 'Mark as Solution' if a post answered your question and always 'Thumbs Up' the posts you like or helped you!
Community Support Team
Community Support Team

Re: Send e-mail with image attachments from Sharepoint list..

Hi @marcusramos ,

Could you please share a bit more about the SP List with images that you mentioned?

Do you store the images in a SP Library or store images in a SP List?

 

If you want to send an email with attachments, please check and see if the following article would help in your scenario:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/connections/connection-office365-outloo...

 

If you want to send an email with multiple images files as attachments, please consider take a try with the following workaround:

1. Add a Gallery control (ImageGallery) in your app, connect it to your Images SP List, then add a Image control (Image1) in it to display image.

2. Set the OnSelect property of the "Send Email" button to following:

Office365.SendEmail(
                    (User().Email & ";**My E-mail**," )&ccemailbox.Text&"",
                    "Order - " & Gallery1.Selected.'Site Name',
                    HtmlText3.HtmlText,
                    {
                      IsHtml: true,
                      Attachments: ForAll(
                                          ImageGallery.AllItems,
                                          {
                                             Name: FileNameColumn,   // FileNameColumn is from your Image SP List
                                             ContentBytes: Image1.Image,   // Image1 is the Image control in the ImageGallery
                                             '@odata.type': ""
                                          }
                                   )
                    }
);

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

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.

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,330)