equal
deleted
inserted
replaced
31 "password":Option(lambda x,y:x, long="password to login into MTA.",default=""), |
31 "password":Option(lambda x,y:x, long="password to login into MTA.",default=""), |
32 "TLS":Option(vBool,long="use TLS for connection to MTA", default=False), |
32 "TLS":Option(vBool,long="use TLS for connection to MTA", default=False), |
33 "SSL":Option(vBool,long="use SSL for connection to MTA", default=False), |
33 "SSL":Option(vBool,long="use SSL for connection to MTA", default=False), |
34 }) |
34 }) |
35 |
35 |
36 def send(self,mail,recipient): |
36 def send(self, recipient, mail): |
37 if not self.testmode: |
37 if not self.testmode: |
38 if self.SSL: |
38 if self.SSL: |
39 smtp = smtplib.SMTP_SSL(self.host,self.port) |
39 smtp = smtplib.SMTP_SSL(self.host,self.port) |
40 else: |
40 else: |
41 smtp = smtplib.SMTP(self.host,self.port) |
41 smtp = smtplib.SMTP(self.host,self.port) |