MCPcopy Create free account
hub / github.com/geekcomputers/Python / SendMessageInternal

Function SendMessageInternal

sendemail.py:51–63  ·  view source on GitHub ↗
(service, user_id, message)

Source from the content-addressed store, hash-verified

49
50
51def SendMessageInternal(service, user_id, message):
52 try:
53 message = (
54 service.users().messages().send(userId=user_id, body=message).execute()
55 )
56
57 print("Message Id: %s" % message["id"])
58
59 return message
60 except errors.HttpError as error:
61 print("An error occurred: %s" % error)
62 return "Error"
63 return "OK"
64
65
66def createMessageWithAttachment(sender, to, subject, msgHtml, msgPlain, attachmentFile):

Callers 1

SendMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected