Subversion Repositories SmartDukaan

Rev

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

Rev 15009 Rev 15010
Line 64... Line 64...
64
        part.add_header('Content-Disposition', 'attachment; filename=%s' % filename + "-insurance-policy.pdf")
64
        part.add_header('Content-Disposition', 'attachment; filename=%s' % filename + "-insurance-policy.pdf")
65
        return part
65
        return part
66
 
66
 
67
    def sendMail(self, mail):
67
    def sendMail(self, mail):
68
        msg = MIMEMultipart()
68
        msg = MIMEMultipart()
69
        if not mail.emailFrom and mail.emailFrom.strip() != "" and mail.emailFrom is not None:
69
        if mail.emailFrom is not None and not mail.emailFrom and mail.emailFrom.strip() != "" :
70
            msg['From'] = mail.emailFrom
70
            msg['From'] = mail.emailFrom
71
        else:
71
        else:
72
            msg['From'] = "Saholic <help@saholic.com>"
72
            msg['From'] = "Saholic <help@saholic.com>"
73
        msg['To'] = ', '.join(mail.emailTo)
73
        msg['To'] = ', '.join(mail.emailTo)
74
        msg['Cc'] = ', '.join(mail.cc)
74
        msg['Cc'] = ', '.join(mail.cc)