Show More
@@ -36,11 +36,10 b' from email.utils import formatdate' | |||
|
36 | 36 | from email import encoders |
|
37 | 37 | |
|
38 | 38 | |
|
39 | ||
|
40 | 39 | class SmtpMailer(object): |
|
41 | 40 | """SMTP mailer class |
|
42 | 41 | |
|
43 | mailer = SmtpMailer(mail_from, user, passwd, mail_server, | |
|
42 | mailer = SmtpMailer(mail_from, user, passwd, mail_server, smtp_auth | |
|
44 | 43 | mail_port, ssl, tls) |
|
45 | 44 | mailer.send(recipients, subject, body, attachment_files) |
|
46 | 45 | |
@@ -50,7 +49,7 b' class SmtpMailer(object):' | |||
|
50 | 49 | |
|
51 | 50 | """ |
|
52 | 51 | |
|
53 | def __init__(self, mail_from, user, passwd, mail_server,smtp_auth, | |
|
52 | def __init__(self, mail_from, user, passwd, mail_server, smtp_auth=None, | |
|
54 | 53 |
|
|
55 | 54 | |
|
56 | 55 | self.mail_from = mail_from |
@@ -163,3 +162,4 b' class SmtpMailer(object):' | |||
|
163 | 162 | #just for safe seek to 0 |
|
164 | 163 | msg_file.seek(0) |
|
165 | 164 | return msg_file.read() |
|
165 |
General Comments 0
You need to be logged in to leave comments.
Login now