'Get an email array from strings
Function getmaillistfromstReam (byval strstream as string) AS arraylist
Dim Re as system.text.RegularExpressions.Regex
Dim regstr as string = "[A-ZA-Z0-9] @ ([A-ZA-Z0-9] /.) [A-ZA-Z0-9] " Email
Dim Mailist As System.Text.RegularExpressions.matchCollection = Re.matches (Strstream, Regstr)
DIM I AS INTEGER: DIM TMPARRAYLIST AS New ArrayList
For i = 0 to maillist.count - 1
IF NOT TMPARRAYLIST.CONTAINS (Maillist.Item (i) .tostring) THEN
TMPARRAYLIST.ADD (Mailist.Item (i) .tostring)
END IF
NEXT
Return TMPARRAYLIST
END FUNCTION