Changeset - 8e77c75bd65a
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2011-10-21 13:28:32
marcin@python-works.com
made auth type optional in constructor
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/smtp_mailer.py
Show inline comments
 
@@ -36,11 +36,10 @@ from email.utils import formatdate
 
from email import encoders
 

	
 

	
 

	
 
class SmtpMailer(object):
 
    """SMTP mailer class
 

	
 
    mailer = SmtpMailer(mail_from, user, passwd, mail_server,
 
    mailer = SmtpMailer(mail_from, user, passwd, mail_server, smtp_auth
 
                        mail_port, ssl, tls)
 
    mailer.send(recipients, subject, body, attachment_files)
 

	
 
@@ -50,7 +49,7 @@ class SmtpMailer(object):
 

	
 
    """
 

	
 
    def __init__(self, mail_from, user, passwd, mail_server,smtp_auth,
 
    def __init__(self, mail_from, user, passwd, mail_server, smtp_auth=None,
 
                    mail_port=None, ssl=False, tls=False, debug=False):
 

	
 
        self.mail_from = mail_from
 
@@ -163,3 +162,4 @@ class SmtpMailer(object):
 
            #just for safe seek to 0
 
            msg_file.seek(0)
 
            return msg_file.read()
 

	
0 comments (0 inline, 0 general)