'Send emails to get daily work summary to all employees'

def send_mails(self, settings, emails):

    incoming_email_account = frappe.db.get_value(u'Email    Account', dict(enable_incoming=1, default_incoming=1), u'email_id')
    self.db_set(u'email_sent_to', u'\n'.join(emails))
    frappe.sendmail(recipients=emails, message=settings.message, subject=settings.subject, reference_doctype=self.doctype, reference_name=self.name, reply_to=incoming_email_account)
