Hi,
I'm new to powerapps.
I've put together a one screen app that collects some text fields and you have the option to attach a photo. I have a submit button that has the following formula for OnSelect:
'Outlook.com'.SendEmailV2("XXXXXX@XXXX.com", "SHE Observation Report", HTML_Record.HtmlText,{Cc:"XXXXX@XXXXX.com", Attachments:Table({Name:"Image.jpg", ContentBytes:AddMedia.Media, '@odata.type':""})})
When I run the app, it works perfectly provided I have added an attachment. However when I dont, I get the following message:
Outlook.com.SendEmailV2 failed: {"status":400, "message": Parameter 'Attachment Cotnent' cannot be null or empty...
I have searched forums and seen similar issues but no resolution, can anyone help me with this?
Solved! Go to Solution.
Hi @Anonymous ,
You should add one content of ContentBytes, if not it will show this error.
Could you please change your formula as this?
Office365.SendEmailV2("xxxx", "SHE Observation Report", HTML_Record.HtmlText,{Cc:"xxxx", Attachments:Table({Name:"Image.jpg", ContentBytes:AddMediaButton1.Media, '@odata.type':""})})
I test on my side and it works ok.
More information:
Hope this could be helpful.
Best Regards.
Yumia
Hi @Anonymous ,
You should add one content of ContentBytes, if not it will show this error.
Could you please change your formula as this?
Office365.SendEmailV2("xxxx", "SHE Observation Report", HTML_Record.HtmlText,{Cc:"xxxx", Attachments:Table({Name:"Image.jpg", ContentBytes:AddMediaButton1.Media, '@odata.type':""})})
I test on my side and it works ok.
More information:
Hope this could be helpful.
Best Regards.
Yumia
User | Count |
---|---|
122 | |
86 | |
83 | |
74 | |
69 |
User | Count |
---|---|
215 | |
179 | |
140 | |
108 | |
83 |