Function
CreateMessageHtml
(sender, to, subject, msgHtml, msgPlain)
Source from the content-addressed store, hash-verified
| 122 | |
| 123 | |
| 124 | def 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 | |
| 134 | def main(): |
Tested by
no test coverage detected