Automated Email - What did I do wrong here?
Steve Holden
sholden at holdenweb.com
Tue Jun 4 12:08:24 EDT 2002
"Ken" <ken at hotmail.com> wrote ...
> "Ken" <ken at hotmail.com> wrote ...
> > "Ken" <ken at hotmail.com> wrote
> > > How to do automated emailing when results being processed?
> > >
> > > Thanks
> > >
> >
> > What did I do wrong? It crash the program. Without these code, the cgi
> > script works fine. Thanks
> >
> > fromaddr = 'ken at hotmail.com'
> > toaddrs = 'ken at hotmail.com'
> > msg = "testing\n"
> > server = smtplib.SMTP('smtp.aol.com')
> > server.sendmail(fromaddr, toaddrs, msg)
> > server.quit()
> >
> oh...and I did import smtplib...
Ken:
You really should stop talking to yourself... <wink>
The "toaddrs" argument to sendmail must be a list, even if there's only one
recipient.
regards
-----------------------------------------------------------------------
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------
More information about the Python-list
mailing list