Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def send_mail(sender,
- to,
- subject,
- body,
- make_sync_call=apiproxy_stub_map.MakeSyncCall,
- **kw):
- """Sends mail on behalf of application.
- Args:
- sender: Sender email address as appears in the 'from' email line.
- to: List of 'to' addresses or a single address.
- subject: Message subject string.
- body: Body of type text/plain.
- make_sync_call: Function used to make sync call to API proxy.
- kw: Keyword arguments compatible with EmailMessage keyword based
- constructor.
- Raises:
- InvalidEmailError when invalid email address provided.
- """
- kw['sender'] = sender
- kw['to'] = to
- kw['subject'] = subject
- kw['body'] = body
- message = EmailMessage(**kw)
- message.send(make_sync_call)
- SendMail = send_mail
- SendMail = send_mail
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement