added new function sendEmails to create HTML email and send it
Added new function sendEmails to create HTML emails and send them