Refined email newsletter error messages

refs https://github.com/TryGhost/Ghost/issues/11971

- Updates error messages incorrectly pointing to invalid mailgun config to show more generic error
- Needs to be updated to point to correct error message in future
This commit is contained in:
Rish 2020-06-30 11:57:18 +05:30
parent 5d22b788c8
commit 85a77388e2
3 changed files with 6 additions and 6 deletions

View File

@ -51,9 +51,9 @@
<div class="pa5 pt3 pb3 f7 bb b--whitegrey"> <div class="pa5 pt3 pb3 f7 bb b--whitegrey">
<p class="mb2 lh-copy"> <p class="mb2 lh-copy">
{{#if this.session.user.isOwner}} {{#if this.session.user.isOwner}}
Email failed to send when publishing this post. Please <LinkTo @route="settings.labs">check your Mailgun configuration</LinkTo> if the error persists. Email failed to send when publishing this post. Please verify your email settings if the error persists.
{{else}} {{else}}
Email failed to send when publishing this post. Please check your Mailgun configuration if the error persists. Email failed to send when publishing this post. Please verify your email settings if the error persists.
{{/if}} {{/if}}
</p> </p>
<p class="ma0 pa0"> <p class="ma0 pa0">

View File

@ -75,7 +75,7 @@ export default Component.extend({
return false; return false;
} }
if (!this.settings.get('bulkEmailSettings.isEnabled')) { if (!this.settings.get('bulkEmailSettings.isEnabled')) {
this.set('sendTestEmailError', 'Please check your Mailgun configuration'); this.set('sendTestEmailError', 'Please verify your email settings');
return false; return false;
} }
this.set('sendTestEmailError', ''); this.set('sendTestEmailError', '');
@ -88,7 +88,7 @@ export default Component.extend({
return yield this.ajax.post(url, options); return yield this.ajax.post(url, options);
} catch (error) { } catch (error) {
if (error) { if (error) {
this.set('sendTestEmailError', 'Error sending mail, please check your Mailgun configuration'); this.set('sendTestEmailError', 'Email could not be sent, verify mail settings');
} }
} }
}).drop(), }).drop(),

View File

@ -33,9 +33,9 @@
<div class="modal-body"> <div class="modal-body">
{{#if this.session.user.isOwner}} {{#if this.session.user.isOwner}}
<p>Your post has been published but the email failed to send. Please <LinkTo @route="settings.labs">check your Mailgun configuration</LinkTo> if the error persists.</p> <p>Your post has been published but the email failed to send. Please verify your email settings if the error persists.</p>
{{else}} {{else}}
<p>Your post has been published but the email failed to send. Please check your Mailgun configuration if the error persists.</p> <p>Your post has been published but the email failed to send. Please verify your email settings if the error persists.</p>
{{/if}} {{/if}}
<p class="mb0"> <p class="mb0">
<button type="button" class="gh-btn gh-btn-text regular" {{action (toggle "errorDetailsOpen" this)}} data-test-toggle-error> <button type="button" class="gh-btn gh-btn-text regular" {{action (toggle "errorDetailsOpen" this)}} data-test-toggle-error>