So the first part
If(
IsBlank(TextSearchBox2_1),
ForAll(
Colemaillist,
Office365Outlook.SharedMailboxSendEmailV2(
"info@uk.com",
Your_x0020_email_x0020_address,
TextEmailSubject2_1.Text,
"Dear " & Your_x0020_first_x0020_name & "<br><br>" & RTEBody.HtmlText,
{
Attachments: RenameColumns(
AttachmentControl.Attachments,
Value,
ContentBytes
),
Importance: "Normal"
}
This works fine on its own, basically, if Text search box2_1 (The Sent to email address) is blank,
then send to emails collected in Collection
I then added in the second part for when the searchbox has an email address in. Send to email
address in the searchbox.The mypeople links to users on the system, finds them if i place in a
work colleague (to be fair, its not needed). Both work by themselves,but together,
the second part gets an error if there is not email address in the search box