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

Function create_msg

recipes/Python/578807_Sending_Email/recipe-578807.py:17–28  ·  view source on GitHub ↗
(to_address,
               from_address='',
               cc_address='',
               bcc_address='',
               subject='')

Source from the content-addressed store, hash-verified

15# takes addresses to, from cc and a subject
16# returns the MIME* object
17def create_msg(to_address,
18 from_address='',
19 cc_address='',
20 bcc_address='',
21 subject=''):
22
23 msg = MIMEMultipart();
24 msg['Subject'] = subject;
25 msg['To'] = to_address;
26 msg['Cc'] = cc_address;
27 msg['From'] = from_address;
28 return msg;
29
30# send an email
31# takes an smtp address, user name, password and MIME* object

Callers 1

compose_emailFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected