Fix SSL error when sending emails