--- a/iro/.eric4project/iro.e4q Sun Nov 22 22:14:07 2009 +0100
+++ b/iro/.eric4project/iro.e4q Mon Nov 23 00:18:04 2009 +0100
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE UserProject SYSTEM "UserProject-4.0.dtd">
<!-- eric4 user project file for project iro -->
-<!-- Saved: 2009-11-13, 01:39:58 -->
+<!-- Saved: 2009-11-23, 00:15:34 -->
<!-- Copyright (C) 2009 Sandro Knauß, bugs@sandroknauss.de -->
<UserProject version="4.0">
</UserProject>
\ No newline at end of file
--- a/iro/.eric4project/iro.e4t Sun Nov 22 22:14:07 2009 +0100
+++ b/iro/.eric4project/iro.e4t Mon Nov 23 00:18:04 2009 +0100
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Tasks SYSTEM "Tasks-4.2.dtd">
<!-- eric4 tasks file for project iro -->
-<!-- Saved: 2009-11-13, 01:39:58 -->
+<!-- Saved: 2009-11-23, 00:15:34 -->
<Tasks version="4.2">
</Tasks>
\ No newline at end of file
--- a/iro/anbieter/content.py Sun Nov 22 22:14:07 2009 +0100
+++ b/iro/anbieter/content.py Mon Nov 23 00:18:04 2009 +0100
@@ -12,6 +12,7 @@
#along with this program; if not, see <http://www.gnu.org/licenses/>.
from email.mime.text import MIMEText
+from email.header import Header
class content:
def __init__(self,content):
@@ -38,8 +39,9 @@
class Mail(content):
def __init__(self, subject, body):
- con=MIMEText(body)
- con['Subject']=subject
+ con=MIMEText(body.encode("utf-8"), _charset='utf-8')
+ sub=Header(subject.encode('utf-8'), 'utf-8')
+ con['Subject']=sub
content.__init__(self, con)
def sendto(self,anbieter,recipients):
--- a/iro/anbieter/smstrade.py Sun Nov 22 22:14:07 2009 +0100
+++ b/iro/anbieter/smstrade.py Mon Nov 23 00:18:04 2009 +0100
@@ -132,7 +132,6 @@
parameters["senddate"] = unicode(timestamp)
parameters["concat_sms"] = "1" if len(message) > 160 else "0"
-
params = "&".join( ["%s=%s" % (urllib.quote(k),urllib.quote(v.encode("utf-8"))) for (k, v) in parameters.items()])
headers = {"Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain"}
--- a/iro/anbieter/smtp.py Sun Nov 22 22:14:07 2009 +0100
+++ b/iro/anbieter/smtp.py Mon Nov 23 00:18:04 2009 +0100
@@ -25,6 +25,7 @@
self.bTLS=False
self.bSSL=False
self.max_recipients=1
+
def read_basic_config(self,config_filename=None):
"""Read basic options from the config file"""
@@ -50,7 +51,6 @@
except ValueError:
self.bSSL=False
-
def prepareSMTP(self):
if self.bSSL:
self.smtp = smtplib.SMTP_SSL(self.host,self.port)
@@ -70,14 +70,14 @@
self.prepareSMTP()
mail.content['From']=self.send_from
+
while len(recipients) > 0:
tmp_recipients=recipients[:self.max_recipients]
- print tmp_recipients
self.smtp.sendmail(self.send_from, tmp_recipients, mail.as_string())
self.updateStatus( arranged=tmp_recipients)
recipients = recipients[self.max_recipients:]
- self.smtp.shutdownSMTP()
+ self.shutdownSMTP()
def updateStatus(self, arranged=None, failed=None):
--- a/iro/iro.e4p Sun Nov 22 22:14:07 2009 +0100
+++ b/iro/iro.e4p Mon Nov 23 00:18:04 2009 +0100
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Project SYSTEM "Project-4.6.dtd">
<!-- eric4 project file for project iro -->
-<!-- Saved: 2009-11-13, 01:39:58 -->
+<!-- Saved: 2009-11-23, 00:15:34 -->
<!-- Copyright (C) 2009 Sandro Knauß, bugs@sandroknauss.de -->
<Project version="4.6">
<Language></Language>
@@ -18,21 +18,23 @@
<Source>xmlrpc/__init__.py</Source>
<Source>xmlrpc/SecureAuthentificateXMLRPCServer.py</Source>
<Source>xmlrpc/AuthentificateXMLRPCServer.py</Source>
- <Source>anbieter/smtp.py</Source>
- <Source>anbieter/geonet.py</Source>
- <Source>anbieter/__init__.py</Source>
- <Source>anbieter/FAX_de.py</Source>
- <Source>anbieter/sipgate.py</Source>
- <Source>anbieter/anbieter.py</Source>
<Source>xmlrpc/SecureUserdbXMLRPCServer.py</Source>
<Source>worker.py</Source>
<Source>user.py</Source>
- <Source>anbieter/telnumber.py</Source>
- <Source>anbieter/test.py</Source>
<Source>test.py</Source>
<Source>providerlist.py</Source>
<Source>joblist.py</Source>
<Source>job.py</Source>
+ <Source>anbieter/smtp.py</Source>
+ <Source>anbieter/geonet.py</Source>
+ <Source>anbieter/content.py</Source>
+ <Source>anbieter/__init__.py</Source>
+ <Source>anbieter/telnumber.py</Source>
+ <Source>anbieter/test.py</Source>
+ <Source>anbieter/FAX_de.py</Source>
+ <Source>anbieter/sipgate.py</Source>
+ <Source>anbieter/gsm0338.py</Source>
+ <Source>anbieter/anbieter.py</Source>
<Source>anbieter/smstrade.py</Source>
</Sources>
<Forms>
--- a/iro/iro.py Sun Nov 22 22:14:07 2009 +0100
+++ b/iro/iro.py Mon Nov 23 00:18:04 2009 +0100
@@ -89,7 +89,7 @@
MyManager.register('SMSJob', SMSJob)
MyManager.register('FAXob', FAXJob)
- MyManager.register('MailJob',FAXJob)
+ MyManager.register('MailJob',MailJob)
MyManager.register('Providerlist',Providerlist)
manager = MyManager()
manager.start()
--- a/iro/job.py Sun Nov 22 22:14:07 2009 +0100
+++ b/iro/job.py Mon Nov 23 00:18:04 2009 +0100
@@ -64,8 +64,6 @@
def stop(self):
pass
-
-
def start(self):
Job.start(self)
self.getProvider().setJob(self)