cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dandandsan
Helper II
Helper II

Office365 send mail

Hello,

 

I have create a button to email tables which are created using html, this works fine when logged in as myself but when I share the app the button doesn't work and doesn't return any errors. The user receives a message when they first access the app asking for permission to access their sharepoint/Office 365 accounts to which they select allow but I'm not sure why it not working. 

 

Example: Office365Outlook.SendEmail("email address","Current Stocks",HtmlCurrentStock.HtmlText,{IsHtml:true})

 

Any help would be much appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

@dandandsan 

I notice you are not using the most current version of the send email function.  Suggest you switch it to this before we go any further.

 

Office365Outlook.SendEmailV2("email address","Current Stocks",HtmlCurrentStock.HtmlText,{IsHtml:true})

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

6 REPLIES 6
mdevaney
Super User
Super User

@dandandsan 

What doesn't work for the user?

 

  • Does the email not send?  Does the user have access to Outlook/Exchange Online?
  • Are the contents of the email not showing or are malformed?  Could be many things

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

@mdevaney 

Thank you for you reply.

 

Yes, the email doesn't send and the user has access to Outlook/Exchange Online so not sure what the issue is?

 

 

@dandandsan 

I notice you are not using the most current version of the send email function.  Suggest you switch it to this before we go any further.

 

Office365Outlook.SendEmailV2("email address","Current Stocks",HtmlCurrentStock.HtmlText,{IsHtml:true})

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

@mdevaney 

 

That worked a treat, the email is coming through when the user is logged into the app, thank you.

 

The only issue I'm experiencing now is the body of the email is showing 'Show your HTML text here' but if I press the button again the correct text is shown. 

 

I had to use the string below as {IsHtml:true}) is not available but can;t see that being the issue as it does work when you press teh button twice.

 

Office365Outlook.SendEmailV2("email address","Current Stock",HtmlCurrentStock.HtmlText)

@dandandsan 
I believe the "Show Your HTML Here" text is due to how the Default property of HtmlCurrentStock.HtmlText is setup.  Can you please check to see what's currently in there and change it to your preferred default value?

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

It's strange, there is no reference to that text any where as I deleted it out when creating my own html. I might try removing the html text altogether and start again. 

 

Thanks for your help with the email side of thing as it has been driving me mad!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,466)