cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ashers82
Frequent Visitor

Can you send two forms of attachments to email?

Hi I'm trying to send photos that I have in a collection "CameraPics" and I also want to send the PenInput as an image as attachments?

 

I thought I could use {attachments: CameraPics & Table({Name:"Signature.jpg",ContentBytes:Signature.Image, '@odata.type':""})}

 

But it doesn't like this, so I'm trying to understand if there is a way to achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Ashers82 ,

Could you please share a bit more about your CameraPics collection?

Does your CameraPics collection have the following data structure?13.JPG

 

If you want to send an email with the CameraPics collection as attachments, your CameraPics collection must be above data structure.

If your CameraPics collection has above data structure already, you could consider merge your CameraPics collection and the PenInput image data into single one Collection, then send the merged collection as the attachments of the meail.

 

I have made a test on my side, please take a try with the following workaround:14.JPG

 

15.JPG

Set the OnSelect property of the "Collect" button to following:

Collect(CameraPics, {Name: "Picture1.jpg", ContentBytes: AddMediaButton1.Media, '@odata.type':""})

On your side, you may type:

Collect(CameraPics, {Name: "Picture1.jpg", ContentBytes: Camera1.Photo, '@odata.type':""})

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

Office365.SendEmailV2(
"Test1@Wicren.onmicrosoft.com",
"PowerApps Test",
"PowerApps Test",
{
Attachments: Collect(CameraPics, {Name: "Signature.jpg", ContentBytes: PenInput1.Image,'@odata.type':""})
}
)

On your side, you should type:

Office365.SendEmailV2(
                      "Your Email Address",
                      "Subject Text",
                      "Body Test",
                      {
                       Attachments: Collect(CameraPics, {Name: "Signature.jpg", ContentBytes: Signature.Image,'@odata.type':""})
                      }
)

Note: Please make sure your CameraPics collection has the data structure as the first screenshot I preovided above.

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

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @Ashers82 ,

Could you please share a bit more about your CameraPics collection?

Does your CameraPics collection have the following data structure?13.JPG

 

If you want to send an email with the CameraPics collection as attachments, your CameraPics collection must be above data structure.

If your CameraPics collection has above data structure already, you could consider merge your CameraPics collection and the PenInput image data into single one Collection, then send the merged collection as the attachments of the meail.

 

I have made a test on my side, please take a try with the following workaround:14.JPG

 

15.JPG

Set the OnSelect property of the "Collect" button to following:

Collect(CameraPics, {Name: "Picture1.jpg", ContentBytes: AddMediaButton1.Media, '@odata.type':""})

On your side, you may type:

Collect(CameraPics, {Name: "Picture1.jpg", ContentBytes: Camera1.Photo, '@odata.type':""})

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

Office365.SendEmailV2(
"Test1@Wicren.onmicrosoft.com",
"PowerApps Test",
"PowerApps Test",
{
Attachments: Collect(CameraPics, {Name: "Signature.jpg", ContentBytes: PenInput1.Image,'@odata.type':""})
}
)

On your side, you should type:

Office365.SendEmailV2(
                      "Your Email Address",
                      "Subject Text",
                      "Body Test",
                      {
                       Attachments: Collect(CameraPics, {Name: "Signature.jpg", ContentBytes: Signature.Image,'@odata.type':""})
                      }
)

Note: Please make sure your CameraPics collection has the data structure as the first screenshot I preovided above.

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (71,607)