{{t "Email newsletter"}}

{{#if this.post.email.isSuccess}} {{!-- Mail has already been sent --}}
{{svg-jar "send-email" class="w7 h7 stroke-darkgrey"}}

{{t "Post was sent by email to"}}

{{pluralize this.post.email.emailCount "member"}}

{{t "Subject:"}} {{this.post.email.subject}}
{{t "Sent:"}} {{gh-format-post-time this.post.email.createdAtUTC}}

{{else if (or this.retryEmail.isRunning this.post.email.isFailure)}} {{!-- Mail failed to send --}}
{{svg-jar "warning" class="w7 h7 fill-red"}}

{{t "Post failed to send to"}}

{{pluralize this.post.email.emailCount "member"}}

{{#if this.session.user.isOwner}} Email failed to send when publishing this post. Please check your Mailgun configuration if the error persists. {{else}} {{t "Email failed to send when publishing this post. Please check your Mailgun configuration if the error persists."}} {{/if}}

{{t "Error:"}} {{this.post.email.error}}

{{t "Subject:"}} {{this.post.email.subject}}
{{t "Tried:"}} {{gh-format-post-time this.post.email.createdAtUTC}}
{{else}} {{!-- Mail not sent yet --}} {{#if this.mailgunError}}

{{svg-jar "info" class="w5 h5 fill-yellow nl1"}} You need to configure Mailgun in Labs → Members settings to enable email newsletters.

{{/if}}
{{#if this.sendTestEmailError}}

{{this.sendTestEmailError}}

{{/if}}
{{/if}}