Browse Source
Merge pull request #20624 from abpframework/testemailsending
Show user friendly message when test email send failed
pull/20631/head
Enis Necipoglu
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with
35 additions and
1 deletions
-
modules/setting-management/src/Volo.Abp.SettingManagement.Application/Volo/Abp/SettingManagement/EmailSettingsAppService.cs
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ar.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/cs.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de-DE.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/el.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fi.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fr.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hi.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hr.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hu.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/is.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/it.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/nl.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pl-PL.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pt-BR.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ro-RO.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ru.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sk.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sl.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/vi.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json
-
modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hant.json
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
using Volo.Abp.Emailing; |
|
|
|
using Volo.Abp.MultiTenancy; |
|
|
|
using Volo.Abp.Features; |
|
|
|
@ -68,7 +69,15 @@ public class EmailSettingsAppService : SettingManagementAppServiceBase, IEmailSe |
|
|
|
{ |
|
|
|
await CheckFeatureAsync(); |
|
|
|
|
|
|
|
await EmailSender.SendAsync(input.SenderEmailAddress, input.TargetEmailAddress, input.Subject, input.Body); |
|
|
|
try |
|
|
|
{ |
|
|
|
await EmailSender.SendAsync(input.SenderEmailAddress, input.TargetEmailAddress, input.Subject, input.Body); |
|
|
|
} |
|
|
|
catch (Exception e) |
|
|
|
{ |
|
|
|
Logger.LogError("Error sending test email: " + e); |
|
|
|
throw new UserFriendlyException(L["MailSendingFailed"]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual async Task CheckFeatureAsync() |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "اختبار البريد الإلكتروني {0}", |
|
|
|
"TestEmailBody": "اختبار نص رسالة البريد الإلكتروني هنا", |
|
|
|
"SuccessfullySent": "أرسلت بنجاح", |
|
|
|
"MailSendingFailed": "فشل إرسال البريد ، يرجى التحقق من تكوين البريد الإلكتروني الخاص بك والمحاولة مرة أخرى.", |
|
|
|
"Send": "يرسل", |
|
|
|
"Menu:Emailing": "إرسال بالبريد الإلكتروني", |
|
|
|
"Menu:TimeZone": "وحدة زمنية", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Testovací e-mail {0}", |
|
|
|
"TestEmailBody": "Test těla e-mailové zprávy zde", |
|
|
|
"SuccessfullySent": "Úspěšně odesláno", |
|
|
|
"MailSendingFailed": "Odesílání e-mailu se nezdařilo. Zkontrolujte konfiguraci e-mailu a zkuste to znovu.", |
|
|
|
"Send": "Poslat", |
|
|
|
"Menu:Emailing": "Zasílání e-mailem", |
|
|
|
"Menu:TimeZone": "Časové Pásmo", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Test E-Mail {0}", |
|
|
|
"TestEmailBody": "Test E-Mail Nachricht hier eingeben", |
|
|
|
"SuccessfullySent": "Erfolgreich gesendet", |
|
|
|
"MailSendingFailed": "E-Mail-Versand fehlgeschlagen. Bitte überprüfen Sie Ihre E-Mail-Konfiguration und versuchen Sie es erneut.", |
|
|
|
"Send": "Senden", |
|
|
|
"Menu:Emailing": "E-Mail", |
|
|
|
"Menu:TimeZone": "Zeitzone", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Test-E-Mail {0}", |
|
|
|
"TestEmailBody": "Testen Sie hier die E-Mail-Textnachricht", |
|
|
|
"SuccessfullySent": "Erfolgreich gesendet", |
|
|
|
"MailSendingFailed": "E-Mail-Versand fehlgeschlagen. Bitte überprüfen Sie Ihre E-Mail-Konfiguration und versuchen Sie es erneut.", |
|
|
|
"Send": "Schicken", |
|
|
|
"Menu:Emailing": "E-Mail senden", |
|
|
|
"Menu:TimeZone": "Zeitzone", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Δοκιμαστικό email {0}", |
|
|
|
"TestEmailBody": "Δοκιμαστικό κείμενο email εδώ", |
|
|
|
"SuccessfullySent": "Στάλθηκε με επιτυχία", |
|
|
|
"MailSendingFailed": "Αποτυχία αποστολής email. Ελέγξτε τη διαμόρφωση του email σας και δοκιμάστε ξανά.", |
|
|
|
"Send": "Αποστολή", |
|
|
|
"Menu:Emailing": "Αποστολή email", |
|
|
|
"SmtpHost": "Διακομιστής", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Test email {0}", |
|
|
|
"TestEmailBody": "Test email body message here", |
|
|
|
"SuccessfullySent": "Successfully sent", |
|
|
|
"MailSendingFailed": "Mail sending failed, Please check your email configuration and try again.", |
|
|
|
"Send": "Send", |
|
|
|
"Menu:Emailing": "Emailing", |
|
|
|
"Menu:TimeZone": "Time Zone", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Correo electrónico de prueba {0}", |
|
|
|
"TestEmailBody": "Pruebe el cuerpo del mensaje de correo electrónico aquí", |
|
|
|
"SuccessfullySent": "Enviado exitosamente", |
|
|
|
"MailSendingFailed": "Error al enviar el correo, por favor revise su configuración de correo y vuelva a intentarlo.", |
|
|
|
"Send": "Enviar", |
|
|
|
"Menu:Emailing": "Configuración", |
|
|
|
"Menu:TimeZone": "Zona Horaria", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Testisähköposti {0}", |
|
|
|
"TestEmailBody": "Testaa sähköpostiviestiä täällä", |
|
|
|
"SuccessfullySent": "Lähetetty onnistuneesti", |
|
|
|
"MailSendingFailed": "Sähköpostin lähetys epäonnistui. Tarkista sähköpostiasetuksesi ja yritä uudelleen.", |
|
|
|
"Send": "Lähetä", |
|
|
|
"Menu:Emailing": "Sähköpostiviestit", |
|
|
|
"Menu:TimeZone": "Aikavyöhyke", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "E-mail test {0}", |
|
|
|
"TestEmailBody": "Testez le corps du message ici", |
|
|
|
"SuccessfullySent": "Envoyé avec succès", |
|
|
|
"MailSendingFailed": "L'envoi de courrier a échoué, veuillez vérifier votre configuration de courrier électronique et réessayer.", |
|
|
|
"Send": "Envoyer", |
|
|
|
"Menu:Emailing": "Envoi par e-mail", |
|
|
|
"Menu:TimeZone": "Fuseau Horaire", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "परीक्षण ईमेल {0}", |
|
|
|
"TestEmailBody": "यहां ईमेल बॉडी संदेश का परीक्षण करें", |
|
|
|
"SuccessfullySent": "सफलतापूर्वक भेजा", |
|
|
|
"MailSendingFailed": "मेल भेजने में विफल, कृपया अपनी ईमेल विन्यास की जाँच करें और पुनः प्रयास करें।", |
|
|
|
"Send": "भेजना", |
|
|
|
"Menu:Emailing": "ईमेल से भेजना", |
|
|
|
"Menu:TimeZone": "समय क्षेत्र", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Probna e-pošta {0}", |
|
|
|
"TestEmailBody": "Testirajte tijelo poruke e-pošte ovdje", |
|
|
|
"SuccessfullySent": "Uspješno poslano", |
|
|
|
"MailSendingFailed": "Slanje e-pošte nije uspjelo, provjerite konfiguraciju e-pošte i pokušajte ponovo.", |
|
|
|
"Send": "Poslati", |
|
|
|
"Menu:Emailing": "Slanje e-poštom", |
|
|
|
"Menu:TimeZone": "Vremenska Zona", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Teszt e-mail {0}", |
|
|
|
"TestEmailBody": "Itt tesztelheti az e-mail törzsüzenetét", |
|
|
|
"SuccessfullySent": "Sikeresen elküldve", |
|
|
|
"MailSendingFailed": "Az e-mail küldése sikertelen, ellenőrizze az e-mail konfigurációját, és próbálja újra.", |
|
|
|
"Send": "Küld", |
|
|
|
"Menu:Emailing": "E-mailezés", |
|
|
|
"Menu:TimeZone": "Időzóna", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Prófunartölvupóstur {0}", |
|
|
|
"TestEmailBody": "Prófaðu meginmál tölvupósts hér", |
|
|
|
"SuccessfullySent": "Tókst sent", |
|
|
|
"MailSendingFailed": "Tölvupóstur sendist ekki. Athugaðu tölvupóst stillingar þínar og reyndu aftur.", |
|
|
|
"Send": "Senda", |
|
|
|
"Menu:Emailing": "Senda tölvupóst", |
|
|
|
"Menu:TimeZone": "Tímabelti", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Prova l'e-mail {0}", |
|
|
|
"TestEmailBody": "Prova il corpo del messaggio email qui", |
|
|
|
"SuccessfullySent": "Inviato con successo", |
|
|
|
"MailSendingFailed": "Invio della posta fallito, controlla la tua configurazione email e riprova.", |
|
|
|
"Send": "Inviare", |
|
|
|
"Menu:Emailing": "Invio di e-mail", |
|
|
|
"Menu:TimeZone": "Fuso Orario", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Test-e-mail {0}", |
|
|
|
"TestEmailBody": "Test hier het hoofdbericht van de e-mail", |
|
|
|
"SuccessfullySent": "Succesvol verzonden", |
|
|
|
"MailSendingFailed": "E-mail verzenden mislukt. Controleer uw e-mailconfiguratie en probeer het opnieuw.", |
|
|
|
"Send": "Versturen", |
|
|
|
"Menu:Emailing": "E-mail", |
|
|
|
"Menu:TimeZone": "Tijdzone", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Testowy e-mail {0}", |
|
|
|
"TestEmailBody": "Tutaj przetestuj treść wiadomości e-mail", |
|
|
|
"SuccessfullySent": "Pomyślnie wysłane", |
|
|
|
"MailSendingFailed": "Wysyłanie e-maila nie powiodło się. Sprawdź konfigurację e-maila i spróbuj ponownie.", |
|
|
|
"Send": "Wysłać", |
|
|
|
"Menu:Emailing": "Wysyłanie e-maili", |
|
|
|
"Menu:TimeZone": "Strefa Czasowa", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "E-mail teste {0}", |
|
|
|
"TestEmailBody": "Corpo de e-mail de teste aqui", |
|
|
|
"SuccessfullySent": "Enviado com sucesso", |
|
|
|
"MailSendingFailed": "Falha no envio de e-mail, verifique sua configuração de e-mail e tente novamente.", |
|
|
|
"Send": "Enviar", |
|
|
|
"Menu:Emailing": "Enviando por e-mail", |
|
|
|
"Menu:TimeZone": "Fuso Horário", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "E-mail de testare {0}", |
|
|
|
"TestEmailBody": "Testați corpul mesajului de e-mail aici", |
|
|
|
"SuccessfullySent": "Trimis cu succes", |
|
|
|
"MailSendingFailed": "Trimiterea e-mailului a eșuat. Verificați configurația e-mailului și încercați din nou.", |
|
|
|
"Send": "Trimite", |
|
|
|
"Menu:Emailing": "Emailing", |
|
|
|
"Menu:TimeZone": "Fus Orar", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Тестовое письмо {0}", |
|
|
|
"TestEmailBody": "Проверьте текст сообщения электронной почты здесь", |
|
|
|
"SuccessfullySent": "Успешно отправлено", |
|
|
|
"MailSendingFailed": "Не удалось отправить письмо. Пожалуйста, проверьте настройки электронной почты и повторите попытку.", |
|
|
|
"Send": "Отправлять", |
|
|
|
"Menu:Emailing": "Отправка по электронной почте", |
|
|
|
"Menu:TimeZone": "Часовой пояс", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Testovací e-mail {0}", |
|
|
|
"TestEmailBody": "Tu otestujte telo e-mailu", |
|
|
|
"SuccessfullySent": "Úspešne odoslané", |
|
|
|
"MailSendingFailed": "Odoslanie emailu zlyhalo. Skontrolujte konfiguráciu emailu a skúste to znova.", |
|
|
|
"Send": "Odoslať", |
|
|
|
"Menu:Emailing": "Posielanie emailov", |
|
|
|
"Menu:TimeZone": "Časové Pásmo", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Preskusno e-poštno sporočilo {0}", |
|
|
|
"TestEmailBody": "Tukaj preizkusite telo e-poštnega sporočila", |
|
|
|
"SuccessfullySent": "Uspešno poslano", |
|
|
|
"MailSendingFailed": "Pošiljanje e-pošte ni uspelo, preverite konfiguracijo e-pošte in poskusite znova.", |
|
|
|
"Send": "Pošlji", |
|
|
|
"Menu:Emailing": "Pošiljanje po e-pošti", |
|
|
|
"Menu:TimeZone": "Časovni Pas", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Test email {0}", |
|
|
|
"TestEmailBody": "E-posta gövdesi mesajını burada test edin", |
|
|
|
"SuccessfullySent": "Başarıyla gönderildi", |
|
|
|
"MailSendingFailed": "E-posta gönderme başarısız, lütfen e-posta yapılandırmanızı kontrol edin ve tekrar deneyin.", |
|
|
|
"Send": "Gönder", |
|
|
|
"Menu:Emailing": "Email", |
|
|
|
"Menu:TimeZone": "Zaman Dilimi", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "Kiểm tra email {0}", |
|
|
|
"TestEmailBody": "Kiểm tra nội dung email tại đây", |
|
|
|
"SuccessfullySent": "Đã gửi thành công", |
|
|
|
"MailSendingFailed": "Gửi email thất bại. Vui lòng kiểm tra cấu hình email của bạn và thử lại.", |
|
|
|
"Send": "Gửi", |
|
|
|
"Menu:Emailing": "Gửi email", |
|
|
|
"Menu:TimeZone": "Múi Giờ", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "测试邮件 {0}", |
|
|
|
"TestEmailBody": "测试邮件内容", |
|
|
|
"SuccessfullySent": "发送成功", |
|
|
|
"MailSendingFailed": "邮件发送失败,请检查您的电子邮件配置并重试。", |
|
|
|
"Send": "发送", |
|
|
|
"Menu:Emailing": "邮件", |
|
|
|
"Menu:TimeZone": "时区", |
|
|
|
|
|
|
|
@ -15,6 +15,7 @@ |
|
|
|
"TestEmailSubject": "測試郵件 {0}", |
|
|
|
"TestEmailBody": "測試郵件內容", |
|
|
|
"SuccessfullySent": "成功發送", |
|
|
|
"MailSendingFailed": "郵件發送失敗,請檢查你的郵件配置並重試.", |
|
|
|
"Send": "發送", |
|
|
|
"Menu:Emailing": "信箱", |
|
|
|
"Menu:TimeZone": "時區", |
|
|
|
|