Hi all,
I'm having trouble sending emails with multiple attachments through my app.
The error encountered is the following:
The OnSelect property of my send icon is:
Office365Outlook.SendEmailV2(
txtDestinatari.Text;
txtOggetto.Text;
txtCorpoMailAirFlash;
{
Importance: "Normal";
Cc: txtCopiaConoscenza.Text;
Bcc: txtCopiaConoscenzaNascosta.Text;
Attachments: RenameColumns(
AllegatiMailAir.Attachments;
"Value";
"ContentBytes"
)
}
);;
Reset(txtCopiaConoscenza);;
Reset(txtDestinatari);;
Reset(txtOggetto);;
Reset(txtCopiaConoscenzaNascosta);;
Back();;
Notify(
"Richiesta inviata con successo!";
NotificationType.Success;;
3000
)
I state that the attachments are correctly imported into the mail sending screen. (see screenshot below)
Hi @roby9390 ,
Could you please share more details about your scenario? I tried to reproduce this issue but failed. How large are the two PDF files? Have you tried to use small jpg files and test?
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
@v-jefferni Thank you for your reply.
The PDF files are large respectively 13Kb and 21Kb.
I think it's not size the issue.
Hi @roby9390 ,
Sorry but I still cannot reproduce this error. Could you please double check the outputs of the table below, by selecting this whole function in the formula bar after files have been uploaded?
RenameColumns(
AllegatiMailAir.Attachments;
"Value";
"ContentBytes"
)
So, if you have uploaded two files, there should be two records return by this function, and no blank contentBytes column value be there.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Hi @v-jefferni
here below the screenshot where you can see that the 2 records appear correctly in the table.
But I think I have omitted something quite important: my Items property of my attachment control is setting as follow:
varRecord.attachments
varRecord is set by pressing an icon contained in a gallery which has the following properties:
Set(varRecord;ThisItem);;Navigate(Schermo_MailAereaFlash;Fade)
In the mail sending screen, the attachments are correctly shown in the appropriate control but it generates the error as if the control were empty. If I delete the automatically uploaded attachments and reload them manually directly from the attachment control on the send mail screen, the problem does not occur and the mail is sent correctly.
Let me know if I wasn't clear on anything.
Hi @roby9390 ,
You can see that the content bytes will contain values from different formats, as distinct from getting saved files in SharePoint lists and manually uploading files:
If you will only send emails with files saved in SharePoint list Attachments column, you need to leverage a flow the get the files from specific list, by passing the selected item ID from PowerApps to Power Automate, then use "Get items" action with filter query set to ID eq "Ask in PowerApps" dynamic content. Next, you can "Get attachments" from that item and get attachment contents, send Email with , as in below blog:
Power Automate send an email with an attachment from SharePoint - EnjoySharePoint
Also, you can reference below video:
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
181 | |
137 | |
96 | |
83 |