I tried the TRIM function and my script still stops completely when I get to one particular address.
I checked the email address using this link validate.aspx. Don't know if this validator makes any sense but I get "Mail box does not exist".
The address giving me all this headache is ocn@thtane.com