Where O Where Could My VARIABLE Be?

Ben Ocean zope at thewebsons.com
Fri May 4 12:27:36 EDT 2001


Yep, that did it! :)) Thank you. I thought I'd lose my sanity...
BenO
**The devil is in the details and well employed in software development.**

At 09:28 AM 5/4/2001 -0600, you wrote:
> > -----Original Message-----
> > From: Ben Ocean [mailto:zope at thewebsons.com]
> > Subject: Where O Where Could My VARIABLE Be?
> >
> >
> > Hi;
> > Why does this send me a blank email when the file has information??
> >  >>>
> > #!/usr/bin/python
> >
> > import cgi, os
> > import string
> > import smtplib
> >
> > print "Content-type: text/html\n\n"
> > file = open("outfile.txt", "r")
> > line = file.readline()
> > file.close()
> > server = smtplib.SMTP("localhost")
> > server.sendmail("beno at thewebsons.com", "beno at thewebsons.com", line)
> > server.quit()
>
>
>This should get you what you want.
>
>server.sendmail("beno at thewebsons.com", "beno at thewebsons.com", 'Subject: My
>line\n\n%s' % line)
>
>The third argument needs to be a valid rfc822 message.
>
>--Karl





More information about the Python-list mailing list