Skip to content

Commit

Permalink
Merge e4600f4 into 377bbd3
Browse files Browse the repository at this point in the history
  • Loading branch information
lavr committed May 26, 2019
2 parents 377bbd3 + e4600f4 commit 9558fea
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions emails/testsuite/smtp_servers.py
Expand Up @@ -10,6 +10,18 @@ def as_bool(value, default=False):
return default
return value.lower() in ('1', 'yes', 'true', 'on')

DEFAULT_SERVERS = {
'gmail.com-tls': dict(from_email=_from, to_email='s.lavrinenko+python-email-test@gmail.com',
host='alt1.gmail-smtp-in.l.google.com', port=25, tls=True),

'mx.yandex.ru': dict(from_email=_from, to_email=_to,
host='mx.yandex.ru', port=25, tls=False),

'outlook.com': dict(from_email=_from, to_email='lavr@outlook.com',
host='smtp-mail.outlook.com', port=587, tls=True),
}

SERVERS = {}

if os.environ.get('TEST_SMTP_HOST'):
SERVERS = {
Expand All @@ -23,15 +35,8 @@ def as_bool(value, default=False):
password=os.environ.get('TEST_SMTP_PASSWORD')
)
}

elif os.environ.get('TRAVIS'):
pass
else:
SERVERS = {
'gmail.com-tls': dict(from_email=_from, to_email='s.lavrinenko+python-email-test@gmail.com',
host='alt1.gmail-smtp-in.l.google.com', port=25, tls=True),
SERVERS = DEFAULT_SERVERS

'mx.yandex.ru': dict(from_email=_from, to_email=_to,
host='mx.yandex.ru', port=25, tls=False),

#'outlook.com': dict(from_email=_from, to_email='lavr@outlook.com',
# host='smtp-mail.outlook.com', port=587, tls=True),
}

0 comments on commit 9558fea

Please sign in to comment.