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

Function CreateMessageHtml

sendemail.py:124–131  ·  view source on GitHub ↗
(sender, to, subject, msgHtml, msgPlain)

Source from the content-addressed store, hash-verified

122
123
124def CreateMessageHtml(sender, to, subject, msgHtml, msgPlain):
125 msg = MIMEMultipart("alternative")
126 msg["Subject"] = subject
127 msg["From"] = sender
128 msg["To"] = to
129 msg.attach(MIMEText(msgPlain, "plain"))
130 msg.attach(MIMEText(msgHtml, "html"))
131 return {"raw": base64.urlsafe_b64encode(msg.as_string())}
132
133
134def main():

Callers 1

SendMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected