Przeglądaj źródła

[fix] [email] [minor] invalid recipient error message

version-14
Anand Doshi 12 lat temu
rodzic
commit
3ef51a236a
1 zmienionych plików z 5 dodań i 2 usunięć
  1. +5
    -2
      webnotes/utils/email_lib/smtp.py

+ 5
- 2
webnotes/utils/email_lib/smtp.py Wyświetl plik

@@ -11,7 +11,6 @@ import webnotes
import conf
from webnotes import msgprint
from webnotes.utils import cint
import email

def get_email(recipients, sender='', msg='', subject='[No Subject]', text_content = None):
"""send an html email as multipart with attachments and all"""
@@ -227,10 +226,14 @@ class EMail:
smtpserver.sess.sendmail(self.sender, self.recipients + (self.cc or []),
self.as_string())
except smtplib.SMTPSenderRefused, e:
except smtplib.SMTPSenderRefused:
webnotes.msgprint("""Invalid Outgoing Mail Server's Login Id or Password. \
Please rectify and try again.""",
raise_exception=webnotes.OutgoingEmailError)
except smtplib.SMTPRecipientsRefused:
webnotes.msgprint("""Invalid Recipient (To) Email Address. \
Please rectify and try again.""",
raise_exception=webnotes.OutgoingEmailError)

class SMTPServer:
def __init__(self, login=None, password=None, server=None, port=None, use_ssl=None):


Ładowanie…
Anuluj
Zapisz