Sending an email on button click (OnSelect)

If ( //validate form inputs here , Notify("Required fields not filled out.", NotificationType.Error); , Office365Outlook.SendEmailV2("email1@domain.tld>;email2@domain.tld", subject, body_content, {Attachments: AttachCollect}); )

Validate Office365Outlook.SendEmailV2 sends correctly

If ( // validate form inputs here , Notify("Required fields not filled out.", NotificationType.Error); , If ( Office365Outlook.SendEmailV2("email1@domain.tld;email2@domain.tld", subject, body_content, {Attachments: AttachCollect}); , Notify("Email send successfully", NotificationType.Success) , Notify("Email failed to send.", NotificationType.Error) ); )