--- a/iro/anbieter/smtp.py Thu Nov 04 21:57:51 2010 +0100
+++ b/iro/anbieter/smtp.py Thu Nov 04 21:58:59 2010 +0100
@@ -70,14 +70,19 @@
logger.debug('SMTP.sendMail(%s,%s)'%(mail, str(recipients)))
if not self.bStart:
self.prepareSMTP()
-
- mail.content['From']=self.send_from
+
+ frm=self.send_from
+
+ if mail.getFrom():
+ frm = mail.getFrom()
+
+ mail.content['From'] = frm
while len(recipients) > 0:
tmp_recipients=recipients[:self.max_recipients]
mail.content['To']=", ".join(tmp_recipients)
- logger.debug('self.smtp.sendmail(%s,%s,%s)'%(self.send_from, str(tmp_recipients), mail.as_string()))
- self.smtp.sendmail(self.send_from, tmp_recipients, mail.as_string())
+ logger.debug('self.smtp.sendmail(%s,%s,%s)'%(frm, str(tmp_recipients), mail.as_string()))
+ self.smtp.sendmail(frm, tmp_recipients, mail.as_string())
self.updateStatus( arranged=tmp_recipients)
recipients = recipients[self.max_recipients:]