def send_draft_copy(account, draft, custom_body, recipient):
 response_on_success = encode(draft)
 response_on_success['body'] = custom_body
 response_on_success = APIEncoder().jsonify(response_on_success)
 try:
  sendmail_client = get_sendmail_client(account)
  sendmail_client.send_custom(draft, custom_body, [recipient])
 except SendMailException as exc:
  kwargs = {}
  if exc.failures:
   kwargs['failures'] = exc.failures
  if exc.server_error:
   kwargs['server_error'] = exc.server_error
  return err(exc.http_code, exc.message, **kwargs)
 return response_on_success

def send_draft_copy ( account , draft , custom_body , recipient ) : response_on_success = encode ( draft ) response_on_success [ 'body' ] = custom_body response_on_success = APIEncoder ( ) . jsonify ( response_on_success ) try : sendmail_client = get_sendmail_client ( account ) sendmail_client . send_custom ( draft , custom_body , [ recipient ] ) except SendMailException as exc : kwargs = { } if exc . failures : kwargs [ 'failures' ] = exc . failures if exc . server_error : kwargs [ 'server_error' ] = exc . server_error return err ( exc . http_code , exc . message , ** kwargs ) return response_on_success
sends a copy of this draft to the recipient .