I was looking at this code from the Python Docs
(http://docs.python.org/library/email-examples.html), trying to learn
how to send email from a Pyhton script. Anyways, part of this code
confused me. Here's the script:
1 # Import smtplib for the actual sending function
2 import smtplib
3
4 # Imp
On 1/14/12, Chris Kavanagh wrote:
> I was looking at this code from the Python Docs
> (http://docs.python.org/library/email-examples.html), trying to learn
> how to send email from a Pyhton script. Anyways, part of this code
> confused me. Here's the script:
>
> 1 # Import smtplib for the actual s
Chris Kavanagh wrote:
16 msg['Subject'] = 'The contents of %s' % textfile
17 msg['From'] = me
18 msg['To'] = you
What I don't understand is lines 16-18, more specifically the
msg['Subject'] format. I thought this was only done with dics??
Obviously the variable msg isn't a dic, so how can th
On 1/14/12, Chris Kavanagh wrote:
> I was looking at this code from the Python Docs
> (http://docs.python.org/library/email-examples.html), trying to learn
> how to send email from a Pyhton script. Anyways, part of this code
> confused me. Here's the script:
>
> 1 # Import smtplib for the actual s