Email: Sending Messages Without Office 365 Outlook Using the Mail Connector
Date: April 20, 2021
Are you unable to use the Office 365 Outlook connector or lack a suitable email account? There’s an alternative for you! In this blog post, we’ll walk you through sending messages via the Mail connector, a simple and effective solution. Discover how to send emails to multiple recipients, include CC/BCC recipients, and even attach files. And remember, if you need more detailed assistance or any technical help, feel free to contact us.
Overview of the Mail Connector
When using the Mail connector, messages come from the ‘Microsoft Power Apps’ email address ([email protected]). Wondering why to use this connector? It provides a seamless way to send emails, especially when you don’t have dedicated email accounts ready.
Benefits of the Mail Connector
- Easy email sending from apps, especially without dedicated email accounts.
- No need for extra configurations like credentials or server addresses.
- Ideal for occasional messages or Power App notifications.
Limitations
All emails include an unsubscribe link. Once a recipient unsubscribes, they won’t receive further emails sent through this connector. Microsoft doesn’t guarantee this connector’s reliability, and there’s a daily limit for message sending. For those requiring a more reliable service, Microsoft suggests the Office365 Outlook connector. More details can be found in the official documentation.
Getting Started: Prerequisite Steps
To start sending emails with the Mail connector, add it to your app via the data panel. With the connector added, you can then reference it in formulas.
1. Sending a Simple Email
For basic usage:
EmailService.SendSimpleMail("[email protected]",
"Your Email Title",
"Your Email Message Content",
false);
2. Emailing Multiple Recipients
For multiple recipients, separate email addresses with a comma or semicolon:
EmailService.SendSimpleMail("[email protected]; [email protected]",
"Your Email Title",
"Your Email Message Content",
false);
3. Specifying Recipient Display Name
You can provide recipient names:
EmailService.SendMailWithDisplayName("[email protected]; [email protected]",
"Your Email Title",
"Your Email Message Content",
false,
{
toname:"Recipient Name1;Recipient Name2"
});
4. Including CC Recipients
Adding CC recipients is straightforward:
EmailService.SendMailWithCC("[email protected]",
"Your Email Title",
"Your Email Message Content",
false,
{
cc:"[email protected];[email protected]",
ccname:"CC Name1;CC Name2"
});
5. Including BCC Recipients
Similar to CC, you can add BCC recipients:
EmailService.SendMailWithBCC("[email protected]",
"Your Email Title",
"Your Email Message Content",
false,
{
cc:"[email protected]",
bcc:"[email protected];[email protected]",
bccname:"BCC Name1;BCC Name2"
});
6. Attaching Files from SharePoint
You can also attach files from SharePoint:
EmailService.SendMailWithAttachment("[email protected]",
"Your Email Title",
"Your Email Message Content",
false,
{
files:First(Item.Attachments).Value,
filenames:First(Item.Attachments).DisplayName
});
7. Attaching User-selected Images
Allow users to pick an image from their device and attach it:
EmailService.SendMailWithUserImage("[email protected]",
"Your Email Title",
"Your Email Message Content",
false,
{
files:UserSelectedImage1.Image,
filenames:"imageName.jpg"
});
Conclusion
The Mail connector offers a streamlined approach to email sending, especially for sporadic communications or Power App notifications. This guide illustrated how to effectively utilize the connector for various email requirements. Should you encounter any challenges or need further technical insights, don’t hesitate to contact us. Our team is ready to assist!