0004-emails-validators-do-not-raise-validation-error-on-t.patch
hobo/emails/validators.py | ||
---|---|---|
41 | 41 |
raise ValidationError(_('Error while connecting to %(server)s: %(msg)s') % {'server': mx_server, 'msg': msg}) |
42 | 42 |
smtp.mail('') |
43 | 43 |
status, msg = smtp.rcpt(value) |
44 |
if status == 250:
|
|
44 |
if status >= 500:
|
|
45 | 45 |
smtp.quit() |
46 |
return
|
|
46 |
raise ValidationError(_('Email address not found on %s') % mx_server)
|
|
47 | 47 |
smtp.quit() |
48 |
raise ValidationError(_('Email address not found on %s') % mx_server) |
|
49 | 48 | |
50 | 49 | |
51 | 50 |
def validate_email_spf(value, strict=False): |
52 |
- |