cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Elephant-Ash
Level: Powered On

Office365.SendEmail Error

Hi Team!

 

I'll try my best to put this in context as I feel I've tried to narrow down where my error is? I'm creating a parcel collection register, once the parcel is collected, the recipient is required to sign (on iPad running V.3.18122.23) to say the parcel has been collected, the OnSelect of the 'Complete' button is...

 

EDIT: Haha the html is reading the code as an emoji. This is actully "ContentBytes : PenInput2.Image" (no spaces)

 

Office365.SendEmail("name@email.com","Send Iamge", DataCardValue4, {Attachments:Table({Name:"Test.gif",ContentBytesSmiley TongueenInput2.Image,'@odata.type':""})}); UpdateContext({HasBeenCollected:true})

 

I now just need to add SubmitForm and Navigate to the end of this, and this is when things go wrong.

  • Using a semicolon ( ; ) I get the error...
Office365.SendEmail("name@email.com","Send Iamge", DataCardValue4, {Attachments:Table({Name:"Test.gif",ContentBytesSmiley TongueenInput2.Image,'@odata.type':""})}); UpdateContext({HasBeenCollected:true}); SubmitForm(Form3); Navigate('Collection Success',ScreenTransition.Fade)

 

  • So I tried to use ampersand ( & ) and still no luck...
Office365.SendEmail("name@email.com","Send Iamge", DataCardValue4, {Attachments:Table({Name:"Test.gif",ContentBytesSmiley TongueenInput2.Image,'@odata.type':""})}); UpdateContext({HasBeenCollected:true}); SubmitForm(Form3)& Navigate('Collection Success',ScreenTransition.Fade)

 

End-game here being the SharePoint list is updated to mark as collected and then the email is sending a copy of the signature (now attached), for a Flow to pick it up and attach it to the SharePoint list. "DataCardValue4" allows the Flow to know which line it needs to be referenced against.

 

Interestingly when testing this inside the app builder, it works, but onces published and used on PC or iPad/iPhone the error is there.

 

PowerApps Error.jpg

 

  

PowerApps Version: 3.19014.10

 

Any help here would be greatly appreciated, I've been stuck on this since December.

 

Cheers,

EA

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Office365.SendEmail Error

Hi @Elephant-Ash,

Please take a try with the following workaround:

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

Set(SentSuccess, Office365.SendEmail("name@email.com","Send Iamge", "Test Email", {Attachments:Table({Name:"Test.gif",ContentBytes: PenInput1.Image,'@odata.type':""})}));
UpdateContext({HasBeenCollected:true});
If(
    !IsBlank(SentSuccess) && SentSuccess = true,
     SubmitForm(Form3); Navigate('Collection Success',ScreenTransition.Fade)
)

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

If the issue still exists, please consider take a try to re-create a new app on your side, then try above solution, check if the issue still exists.

 

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.
3 REPLIES 3
Community Support Team
Community Support Team

Re: Office365.SendEmail Error

Hi @Elephant-Ash,

I have made a test on my side, and don't have the issue that you mentioned.  The screenshot as below:1.JPG

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

Office365.SendEmail("name@email.com","Send Iamge", "Test Email", {Attachments:Table({Name:"Test.gif",ContentBytesSmiley TongueenInput1.Image,'@odata.type':""})})

Based on the error message that you mentioned, it seems to tell that there is something wrong with the value you provided for the ContentBytes property in your Office365.SendEmail() formula. 

Please check if you have provided a valid (not null) value for the ContentBytes property in your Office365.SendEmail() formula. In other words, please check if you have draw a valid picture within your Pen Input control.

In addition, please consider take a try to turn off/disblae the "Improved app rendering (final validation)" option within Advanced settings of App settings of your app, then re-publish your app, check if the issue is solved.

If the issue still exists, please consider take a try to re-create a new connection to your Office 365 Outlook connector within your app, then try your Office365.SendEmail() formula again, check if the issue still exists.

 

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

Re: Office365.SendEmail Error

Hi @v-xida-msft,

 

Thanks for checking in on this one.

 

I don't have an issue with the actual Office365.SendEmail() code, it's the task I'm trying to complete after this, but still in the same OnSelect function.

 

Office365.SendEmail("name@email.com","Send Iamge", "Test Email", {Attachments:Table({Name:"Test.gif",ContentBytesSmiley TongueenInput1.Image,'@odata.type':""})}); UpdateContext({HasBeenCollected:true}); SubmitForm(Form3); Navigate('Collection Success',ScreenTransition.Fade)

I have continued to test, trying one command at a time, I have now sucessfully tested with the SendEmail with UpdateContext and SubmitForm, but I've now identifed that it's specifically the Navigate that is causing the issue. It's when I use this that the red error message occurs, even though the navigation takes place, it sucessfully completes SubmitForm then fails to SendEmail.

 

I have now also disabled the "Improved app rendering (final validation)" option, but unfortunately still no sucess.

 

I did build this again in a new app to try the new connections as it would all be on a blank canvas - still no luck.

 

Thanks for the suggestions.

 

Cheers,
EA

Community Support Team
Community Support Team

Re: Office365.SendEmail Error

Hi @Elephant-Ash,

Please take a try with the following workaround:

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

Set(SentSuccess, Office365.SendEmail("name@email.com","Send Iamge", "Test Email", {Attachments:Table({Name:"Test.gif",ContentBytes: PenInput1.Image,'@odata.type':""})}));
UpdateContext({HasBeenCollected:true});
If(
    !IsBlank(SentSuccess) && SentSuccess = true,
     SubmitForm(Form3); Navigate('Collection Success',ScreenTransition.Fade)
)

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

If the issue still exists, please consider take a try to re-create a new app on your side, then try above solution, check if the issue still exists.

 

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.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

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: 36 members 4,064 guests
Please welcome our newest community members: