Changed e-mailing functions to use a persistent connection to avoid connection refusal when sending many emails