(data, content_type)
| 369 | raw_data = b"" |
| 370 | |
| 371 | def create_binmsg(data, content_type): |
| 372 | maintype, subtype = content_type.split("/", 1) |
| 373 | msg = MIMEBase(maintype, subtype) |
| 374 | msg.set_payload(data) |
| 375 | return msg |
| 376 | |
| 377 | if isinstance(raw_data, str): |
| 378 | bdata = raw_data.encode("utf-8") |