making sendEmail work from admin.