iro/anbieter/FAX_de.py
author Sandro Knauß <knauss@netzguerilla.net>
Mon, 05 Mar 2012 23:51:56 +0100
branchdevel
changeset 217 d755b2e0cc0b
parent 0 a3b6e531f0d2
permissions -rw-r--r--
task now saves own status

# -*- coding: utf-8 -*-
#Copyright (C) 2009  Sandro Knauß <bugs@sandroknauss.de>

#This program is free software; you can redistribute it and/or modify it under the terms
#of the GNU General Public License as published by the Free Software Foundation;
#either version 3 of the License, or any later version.
#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
#without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#See the GNU General Public License for more details.

#You should have received a copy of the GNU General Public License
#along with this program; if not, see <http://www.gnu.org/licenses/>.

from smtp import SMTP
from geonet import geonet
from telnumber import telnumber

class FAX_de(geonet):
    section="FAX_de"
    default_conf="iro.conf"
    max_recipients=50

    def __init__(self):
        self.smtp=SMTP(self.default_conf,self.section)

    def createMailaddress(produkt,number):
        try:
            tel=telnumber(number)
            return "%s00%s%s@fax.de" %(produkt,tel.land,tel.number)
        except:
            return number