

def validate(self):
    'validate the email ids'
    from frappe.utils import validate_email_add
    if (not self.sender):
        self.sender = self.email_account.default_sender
    validate_email_add(strip(self.sender), True)
    self.reply_to = validate_email_add((strip(self.reply_to) or self.sender), True)
    self.replace_sender()
    self.recipients = [strip(r) for r in self.recipients]
    self.cc = [strip(r) for r in self.cc]
    for e in (self.recipients + (self.cc or [])):
        validate_email_add(e, True)

dataset/ETHPy150Open frappe/frappe/frappe/email/email_body.py EMail.validate/original