Mail BuildingBlock
The Ometa Framework provides an out-of-the-box solution to send emails. This functionality can be found in the 'Ometa.Utilities' object, in the 'Send Mail' method.
Mail Profile
In order to execute this buildingblock, a specific mailing profile is required. This can be from any of these templates:
- Graph API - Mail Building Block: Template to send emails using the Graph API, this requires a ClientId, ClientSecret and Url.
- SMTP - Mail Building Block: Template to send emails using SMTP. This is using basic authentication. Avoid this when using SharePoint Online as basic authentication will be disabled in the near future. Consult this Microsoft article for more information.
- Mail Building Block: Template where either SMTP or Graph API can be configured. When the ClientId, ClientSecret, From and Url are configured, the Graph API is preferred.
Graph API Permission
The 'From' user in the mail building block requires the Mail.Send
permission. See the steps in the Microsoft Provider article for a guide to set up an application. This guide also shows the process to retrieve a ClientID and ClientSecret required for the profile.
Permission Mail.Send
Follow these steps to add the Mail.Send
permission:
- Click on the API permissions in the navigation tree on the left of the application registration
- Click on Add a permission
- Click on the tile Microsoft Graph
- Choose Application permissions as permission type
- Choose Mail.Send and click Add permissions