
I have created a shopping cart and when the order is ready, the customer should receive an e-mail with the items he has ordered. I do this with the command:
Office365Outlook.SendEmailV2(User().Email, ...
If the user receives an e-mail, then the sender is his own e-mail-Address, which is not correct and this is confusing for the customer when he receives an e-mail from himself.
So I add the following to my code:
{
From:"marketing@xxxx.de"
}
then the customer get the error message that the order user does not have permission to send emails for the marketing user.
What is the correct procedure so that the customer receives an email from marketing@xxx.de?
The correct process would be to not trigger the flow from the app - you would have the app instead write data to a datasource and then you create a new flow that is triggered 'when an item is created'.
Flows that are created inside an App run under the user context, so it doesn't matter what connection you use when creating the flow as it will always use the user's connections. Th user's don't normally have the right to send from marketing, and the app will use what access they currently have in Microsoft Exchange.
That is why we would use a flow that runs outside the app - then in the flow you can use a connection with an account that has send as rights to that marketing address. So if your developer account that creates apps/flows has rights to send from that account then you can use the 'send as' property of the action to send as marketing (if your account that you are building the flow with has that right)