Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. def send_mail(sender,
  2. to,
  3. subject,
  4. body,
  5. make_sync_call=apiproxy_stub_map.MakeSyncCall,
  6. **kw):
  7. """Sends mail on behalf of application.
  8.  
  9. Args:
  10. sender: Sender email address as appears in the 'from' email line.
  11. to: List of 'to' addresses or a single address.
  12. subject: Message subject string.
  13. body: Body of type text/plain.
  14. make_sync_call: Function used to make sync call to API proxy.
  15. kw: Keyword arguments compatible with EmailMessage keyword based
  16. constructor.
  17.  
  18. Raises:
  19. InvalidEmailError when invalid email address provided.
  20. """
  21. kw['sender'] = sender
  22. kw['to'] = to
  23. kw['subject'] = subject
  24. kw['body'] = body
  25. message = EmailMessage(**kw)
  26. message.send(make_sync_call)
  27.  
  28.  
  29. SendMail = send_mail
  30.  
  31. SendMail = send_mail
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement