Re: error while writing program to send mail.

2014-09-01 Thread Cameron Simpson
On 02Sep2014 05:05, Om Prakash torque.in...@gmail.com wrote: I am writing this program from https://docs.python.org/2/library/email-examples.html but getting the error as singhom@debian:~/pythons$ python send_email.py Traceback (most recent call last): File send_email.py, line 18, in module

Re: error while writing program to send mail.

2014-09-01 Thread MRAB
On 2014-09-02 00:35, Om Prakash wrote: Hi, I am writing this program from https://docs.python.org/2/library/email-examples.html but getting the error as singhom@debian:~/pythons$ python send_email.py Traceback (most recent call last): File send_email.py, line 18, in module

Re: error while writing program to send mail.

2014-09-01 Thread Om Prakash
On 09/02/2014 05:29 AM, MRAB wrote: On 2014-09-02 00:35, Om Prakash wrote: Hi, I am writing this program from https://docs.python.org/2/library/email-examples.html but getting the error as singhom@debian:~/pythons$ python send_email.py Traceback (most recent call last): File

Re: error while writing program to send mail.

2014-09-01 Thread Denis McMahon
On Tue, 02 Sep 2014 05:05:41 +0530, Om Prakash wrote: fp = open(message, 'rb') message here is a string literal fp.close should be fp.close() msg['Subject'] = 'The contents of $s' % message message here is a variable. The variable named message has not previously had a value assigned to