def send(self, from_, to, subject, text='<STR_LIT>', html='<STR_LIT>', cc=[], bcc=[],<EOL>headers={}, attachments=[]):
if isinstance(to, string_types):<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>if text == '<STR_LIT>' and html == '<STR_LIT>':<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>return self._session.post('<STR_LIT>'.format(self._url), json={<EOL>'<STR_LIT>': from_,<EOL>'<STR_LIT:to>': to,<EOL>'<STR_LIT>': cc,<EOL>'<STR_LIT>': bcc,<EOL>'<STR_LIT>': subject,<EOL>'<STR_LIT>': headers,<EOL>'<STR_LIT:text>': text,<EOL>'<STR_LIT:html>': html,<EOL>'<STR_LIT>': list(self._process_attachments(attachments)),<EOL>}).json()<EOL>
Send an email.