Hi PowerApps team,
I am facing an issue, I created a form and I set that when the user submits the form. That time it wants to save that form into my SharePoint and also wants to send a mail with an attachment to admin.
For this scenario, I used the code in my app. I am getting mail when the user submits the form. But in that mail attachment is not included.
Please review this code and If is there any mistakes or errors. Please reply to this post.
SubmitForm('Employee Form_1');
ClearCollect(
RecipientList,
MyPeople.Mail
);
Set(
_emailRecipientString,
Concat(
RecipientList,
Mail,
";"
)
);
Office365Outlook.SendEmail(
"abcd@gmail.com",
"New Referral Submitted for " & JobDataCardValue1_1.Text & " Position",
Concatenate(
"Hi HR Team,",
Char(10),
Char(10),
"I hope this email finds you well. I wanted to inform you that a new referral has been submitted via our referral form.",
Char(10),
Char(10),
"The referral details are as follows:",
Char(10),
Char(10),
"- Name: ",
NameDataCardValue5_1.Text,
Char(10),
"- Position: ",
JobDataCardValue1_1.Text,
Char(10),
"- Referred by: ",
User().FullName,
Char(10),
Char(10),
"Please take the necessary actions to verify the profile and follow up with the candidate accordingly.",
Char(10),
Char(10),
"You can view the referral form in PowerApps here: ",
"https://web.powerapps.com/apps/<AppID>/edit/ReferralForm",
Char(10),
Char(10),
"Thank you for your attention to this matter."
),
{
Importance: "Normal",
Attachments: AddColumns(
RenameColumns(
txtemailattach_1.Attachments,
"Value",
"ContentBytes"
),
"@odata.type",
"")
}
);
ClearCollect(
MyPeople,
{Mail: ""}
);
I hope you can help me with this. @vikas1606 @WarrenBelz @iAm_ManCat and others