Fixing sending email problem