Add line to handle Exception thrown :{An invalid character was found in ...

Add line to handle Exception thrown :{An invalid character was found in the mail header: ','.

list = list.TrimEnd(',');
the email I read has ',' at the end of ' To 'adresses