
Hello! I have an attachment control with images (.jpg) which looks like the following:
At pressing the "Send" button, I would like to send an email with the attachments using the "Mail" Connector (since the Outlook 365 Connector is blocked in my environment). The code that I wrote looks like this:
As soon as I enter the line: {files:AddColumns(RenameColumns(DataCardValue18.Attachments, "Value", "ContentBytes"), "@odata.type", "")}, it gives me an error, saying: "Incompatible type. The 'files' column in the data source you´re updating expects a Blob type and you´re using a 'Table' type.".
How can I achieve this? I would to send the images with the "Mail" connector without using Flow (like the Office 365 Outlook connector...) Thank you!
Hi @Anonymous
The syntax you would use looks like this:
Mail.SendEmailV3("recipient@emil.com",
"Enter the email title here",
"Enter your email message here",
false,
{
files:First(DataCardValue18.Attachments).Value,
filenames:First(DataCardValue18.Attachments).DisplayName
}
)
Note that the mail connector supports the attachment of a single file only. There are more details in my post here.
http://powerappsguide.com/blog/post/when-and-how-to-use-mail-connector