Merge pull request #9881 from jumpserver/pr@dev@perf_email_test_error

perf: 邮箱测试时,不填写'主题前缀'会报错
pull/9883/head
老广 2 years ago committed by GitHub
commit c1d1863af4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,7 +42,7 @@ class MailTestingAPI(APIView):
# if k.startswith('EMAIL'):
# setattr(settings, k, v)
try:
subject = settings.EMAIL_SUBJECT_PREFIX + "Test"
subject = settings.EMAIL_SUBJECT_PREFIX or '' + "Test"
message = "Test smtp setting"
email_from = email_from or email_host_user
email_recipient = email_recipient or email_from

Loading…
Cancel
Save