Reputation: 13
I want to write a python that can sends data to a draft message, but NOT Send the mail directly.
Situation: I'm a 3D animator. After done some shots, we need to send email(not internet, just in our company) to Lighting Team. So we have some mail form, but sometimes we need to fix some words manual(version,texture..etc).
like below:
Shot Name : XXXX_seqXXX_scXXX File Locate(hair + cloth) : please import X:\XX\XX\XX\XXX_ABC.ma File include: XXX_hair **(use version 1)** XXX_cloth ZZZ_cloth **(No texture)** any problem please tell me. Thanks. Ezylryb
Question is:
Now I can write into a file, but I don't know how to open mail software(win7 Livemail) and create a new mail has these content. I'm try to use smtplib, but it will send mail directly..
Could anyone help me??
Many Thanks!!!!
Ezylryb
==============================
Finally, I write HTML code into a .html file, and a eml file with email address + Title + CC, and use os.startfile to open both files.
And I can copy/paste to draft email ^O^.
Coz we need some chinese words, so use big5 code in eml, and use qupori module to decode MIME words to Chinese words in html file.
Upvotes: 1
Views: 2583
Reputation: 72795
A "draft" is a feature which your email client (in this case Win7 livemail) implements by itself. It's more or less just an email in a mailbox that the client hasn't sent yet. Mail folders like your "outbox" etc. are similar.
It's not something that Python has access to. If the mail client uses a standard mailbox format, you might be able to create the email and write it into the mailbox using mailbox module. If not, the best you can do is to write out your draft email into a file and then open that in your mail client and manually edit it.
Upvotes: 2