When a user adds recipients, the following checks are performed: Is the address a valid email? If there are multiple addresses, they are separated by spaces, commas, or semicolons in gallery; if multiple addresses are detected, all valid addresses are added to the recipients.
I used this code for it but the gallery name field gives an error (ThisItem.Osoite) (Osoite = expected text value)
ForAll( Split( Substitute(Substitute(Trim(VastaanottajaOsoite.Value), ";", ","), " ", ","), "," ), If( IsMatch(Value, ".+@.+\..+"), Collect(vastaanottajat, {Osoite: Split( Substitute(Substitute(Trim(VastaanottajaOsoite.Value), ";", ","), " ", ","), "," )}) ) )