MCPcopy Create free account
hub / github.com/ActiveState/code / attach_text

Function attach_text

recipes/Python/578807_Sending_Email/recipe-578807.py:91–93  ·  view source on GitHub ↗
(msg, atext, mode)

Source from the content-addressed store, hash-verified

89# attach text
90# attaches a plain text or html text to a message
91def attach_text(msg, atext, mode):
92 part = MIMEText(atext, get_mode(mode));
93 msg.attach(part);
94
95# util function to get mode type
96def get_mode(mode):

Callers 1

compose_emailFunction · 0.85

Calls 2

get_modeFunction · 0.85
attachMethod · 0.45

Tested by

no test coverage detected