As a FYI, google has safeguards in place to prevent automated searches as you describe. A handful of searches via automation probably will not cause problems for you, but a "large text file"'s worth of searches may cause google to prevent you from conducting searches.
Thanks, the text file would be large but the emails maybe around 100-200