Add line to handle Exception thrown :{An invalid character was found in the mail header: ','.

Add line to handle Exception thrown :{An invalid character was found in the mail header: ','.
list = list.TrimEnd(',');