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
Highlighted
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!
Highlighted
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
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

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