problem with a python script

Felix Seeger seeger at sitewaerts.de
Tue Nov 20 17:27:14 CET 2001


Hi

I'm new to python (starting 5 minutes bevor writing this mail ;))
I've got a programm from another person.
I like to change the code, so I can use it, but I can't start the orginal 
code ;(

Here is the output:

seeger at vauva:~/lin$ python2.1 radminserver.py
Traceback (most recent call last):
  File "radminserver.py", line 1, in ?
    from internet import *
  File "internet.py", line 46
    def sendmail(self,from,to,msg,mopts="",rcptopts=""):
                         ^
SyntaxError: invalid syntax



Here is the part of the code:


class Mail:
        def __init__(self,outserver="localhost"):
                import smtplib
                self.outserver=outserver

        def sendmail(self,from,to,msg,mopts="",rcptopts=""):
                s=smtplib.SMTP(outserver)
                s.sendmail(from,to,msg,mopts,recptopts)
                s.quit()



thanks

have fun
HAL



More information about the Python-list mailing list