Subversion Repositories SmartDukaan

Rev

Rev 6947 | Rev 7423 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6947 Rev 7040
Line 76... Line 76...
76
        msg.attach(html_msg)
76
        msg.attach(html_msg)
77
 
77
 
78
        if mail.emailType == "DeliverySuccess":
78
        if mail.emailType == "DeliverySuccess":
79
            tclient = TransactionClient().get_client()
79
            tclient = TransactionClient().get_client()
80
            document = tclient.getDocument(1, int(mail.source))
80
            document = tclient.getDocument(1, int(mail.source))
81
            if document:
81
            if document != bin(0):
82
                msg.attach(self.get_attachment_part(document, mail.source))
82
                msg.attach(self.get_attachment_part(document, mail.source))
83
            
83
            
84
        try:
84
        try:
85
            self.setMailServerAndPassword(mail)
85
            self.setMailServerAndPassword(mail)
86
            rs = self.mailServer.sendmail(self.password, mail.emailTo + mail.cc + mail.bcc, msg.as_string())
86
            rs = self.mailServer.sendmail(self.password, mail.emailTo + mail.cc + mail.bcc, msg.as_string())