Commit Graph

69 Commits

Author SHA1 Message Date
Sanne de Vries
b79534387d Updated notification email mobile styles
ref https://linear.app/tryghost/issue/PLG-200
2024-08-29 17:15:45 +01:00
Kevin Ansfield
0647172ca8 Added style inlining to staff service emails
no issue

- uses same `juice` version that we use in our newsletter emails
2024-08-29 17:15:45 +01:00
Sanne de Vries
2b90ca9082
Updated member link styling in donation email (#20872)
REF PLG-202
- Removed underline from member link
- Changed → to •
2024-08-29 09:58:40 +00:00
Sanne de Vries
0532e4063f
Fixed potential orphaned words in notification email titles (#20860)
REF PLG-150
2024-08-28 16:03:37 +00:00
Sanne de Vries
76f9b7982b
Updated donation email CTA's (#20857)
REF PLG-160
- Added link to member profile next to name in donation email
- Added "Say thanks" CTA to donation email without message
2024-08-28 16:37:25 +02:00
Ronald Langeveld
e8e1b8ea2f
Added donation message to Stripe and Email (#20828)
ref PLG-160

- Refactored donation handling logic to be processed within the
`checkout.session.completed` webhook event.
- Added support for capturing and storing donation messages from Stripe
sessions.
- Integrated donation messages into the email notifications sent to
staff.
- Added database integration.
- Removed redundant donation logic from the invoice.payment_succeeded
webhook, since custom fields isn't supported.
- Updated and added new tests

---------

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2024-08-28 21:08:42 +09:00
Sanne de Vries
814e03be76
Updated recommendation received notification email design (#20748)
REF PLG-162
- Added publication icon and improved overall layout
2024-08-14 09:49:17 +02:00
Sag
0d9955538d
Removed fallback Ghost icon in staff notifications (#20731)
ref https://linear.app/tryghost/issue/PLG-150

- if the publication has no custom icon, staff notifications do not
render the Ghost icon as fallback anymore
2024-08-08 17:47:51 +02:00
Sanne de Vries
bdff3d7b5c
Updated paid cancellation notification email design (#20726)
REF DES-572
2024-08-08 14:36:43 +02:00
Sanne de Vries
9db1fe9a22
Improved new paid subscription email design (#20718)
REF MOM-340
2024-08-06 16:29:13 +00:00
Sanne de Vries
e378252d36
Improved new free signup email design (#20716)
REF MOM-339
2024-08-05 14:44:24 +02:00
Sanne de Vries
5ed2793369
Added publication icon to donation notification email (#20704)
REF MOM-317
- Added site icon to add some flair and personal branding to the
donation notification email.
2024-08-05 13:43:24 +02:00
Sanne de Vries
18c5c3bba8
Improved one-time payment notification email design (#20653)
REF MOM-317
2024-07-24 09:57:34 +00:00
Sag
e476eebd2d
🎨 Added staff notification when a sub is canceled due to failed payments (#20534)
ref https://linear.app/tryghost/issue/ENG-1254

- when a subscription is canceled automatically by Stripe (e.g. due to
multiple failed payments), we now send a staff notification
- logic before: if a member cancels a sub in Portal, then send a staff
notification
- logic now: if a subscription was active, but is now set to cancel
immediately or at the end of the billing period, then send a staff
notification.
- with that logic change, we now send a cancellation staff notification
when:
    1. A member cancels their sub in Portal (existing)
    2. A staff member cancels a member sub in Stripe (new)
    3. A staff member cancels a member sub in Admin (new)
    4. A sub is canceled automatically by Stripe because of multiple failed
payments (new)
- the copy of the staff notification email has also been updated to take
into account 1) manual vs automatic cancellations, and 2) immediate vs
end of billing period cancellations
2024-07-15 08:07:18 +02:00
Simon Backx
17ec1e8937
Added email address alignment protections (#19094)
ref GRO-54
fixes GRO-63
fixes GRO-62
fixes GRO-69

When the config `hostSettings:managedEmail:enabled` is enabled, or the
new flag (`newEmailAddresses`) is enabled for self-hosters, we'll start
to check the from addresses of all outgoing emails more strictly.

- Current flow: nothing changes if the managedEmail config is not set or
the `newEmailAddresses` feature flag is not set
- When managedEmail is enabled: never allow to send an email from any
chosen email. We always use `mail.from` for all outgoing emails. Custom
addresses should be set as replyTo instead. Changing the newsletter
sender_email is not allowed anymore (and ignored if it is set).
- When managedEmail is enabled with a custom sending domain: if a from
address doesn't match the sending domain, we'll default to mail.from and
use the original as a replyTo if appropriate and only when no other
replyTo was set. A newsletter sender email addresss can only be set to
an email address on this domain.
- When `newEmailAddresses` is enabled: self hosters are free to set all
email addresses to whatever they want, without verification. In addition
to that, we stop making up our own email addresses and send from
`mail.from` by default instead of generating a `noreply`+ `@` +
`sitedomain.com` address

A more in depth example of all cases can be seen in
`ghost/core/test/integration/services/email-addresses.test.js`

Includes lots of new E2E tests for most new situations. Apart from that,
all email snapshots are changed because the from and replyTo addresses
are now included in snapshots (so we can see unexpected changes in the
future).

Dropped test coverage requirement, because tests were failing coverage
locally, but not in CI

Fixed settings test that set the site title to an array - bug tracked in
GRO-68
2023-11-23 10:25:30 +01:00
Djordje Vlaisavljevic
057d952e27
Made new recommendation email more flexible (#18915)
refs https://github.com/TryGhost/Product/issues/4095

- Removes `min-height` of the card in order to make the template more
flexible half-empty states look better (missing description, short
description, featured image...)
- Fixes wrong variables used in Outlook-specific template
2023-11-08 16:44:48 +00:00
Simon Backx
398b98b5f6
Cleaned up some email helpers (#18806)
no issue
2023-10-31 12:25:05 +00:00
Sag
9ba1d47b04
Updated copy in the Recommendation email notification (#18671)
closes https://github.com/TryGhost/Product/issues/4031
2023-10-17 17:03:24 +00:00
Sag
22618aad65
Fixed broken link in Recommendations email notification (#18666)
no issue

- paths in the new settings are not using /settings-x/... anymore
2023-10-17 10:44:28 -03:00
Djordje Vlaisavljevic
08f81dbf90
Updated recommendations design (#18614)
refs https://github.com/TryGhost/Product/issues/4024, https://github.com/TryGhost/Product/issues/3938

- Improved email notification template
- Added `for you` next to the click/subscribe stats

---------

Co-authored-by: Sag <guptazy@gmail.com>
2023-10-16 18:04:15 +01:00
Ronald Langeveld
c3ab2d322f
Removed Admin X labs flags in email service (#18536)
no issue

- Removed redundant Admin X flags from the email service since we are preparing for release.
- updated snapshots

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at fb0df07</samp>

Simplified staff URL generation for emails by removing unused feature
flag and code. This affects the `StaffServiceEmails.js` file and the
`adminXSettings` flag.
2023-10-09 17:05:10 +07:00
Djordje Vlaisavljevic
2574546f2e
Updated recommendation email design (#18521)
refs https://github.com/TryGhost/Product/issues/3939

- Fixed Outlook and iOS Mail issues
- Fixed inconsistent button color
2023-10-06 13:04:59 +00:00
Sag
15adb254f0
Added an option to recommend back in Admin Settings (#18478)
refs https://github.com/TryGhost/Product/issues/3978

- added "GET /incoming_recommendations/" browse endpoint to the Admin
API - we store incoming recommendations as mentions in the database. The
new endpoint reuses the Mentions API underneath to fetch verified
mentions of type recommendation - recommendation-specific attributes are
returned by the new endpoint, including calculated fields such as the
"RecommendingBack" boolean
- show "Recommend back" option for sites recommending me, only if I
haven't recommended the site already
2023-10-04 15:22:04 +00:00
Djordje Vlaisavljevic
e4f518868e
Updated Recommendations design (#18390)
refs https://github.com/TryGhost/Product/issues/3938

- Updated "Recommendation received" email design
- Slightly improved how dark favicons show in dark mode
- Added TabView with counter variant to Storybook
2023-09-28 15:22:00 +01:00
Simon Backx
05215734af
Added recommend back URL (#18382)
refs https://github.com/TryGhost/Product/issues/3958

- Disabled automatic network retries for external site lookups (=> timed
out to 5s in every situation because it returned 404 when a site doesn't
implement the Ghost api)
- Disabled representing a modal when it is already present on hash
changes
- Added support for search params in modals
- Handle `?url` search param in the addRecommendationModal
2023-09-28 10:54:16 +00:00
Simon Backx
b51e12d90f
Added emails for recommendations (#18361)
fixes https://github.com/TryGhost/Product/issues/3938
2023-09-26 15:29:17 +00:00
Simon Backx
3a5c233122
🐛 Fixed staff emails eventually having invalid styles (#18363)
fixes https://github.com/TryGhost/Ghost/issues/17937

- We used a global Handlebars instance, which means it was reused across
Ghost
- Partials are different between parts of Ghost, that means the partials
were overwritten every time a normal Mailgun email was send
- All staff emails send after a normal newsletter would have invalid
styles because the partials for styles were overwritten
2023-09-26 16:25:03 +02:00
Ronald Langeveld
37512a712d
Added email settings links to point to Admin X (#17883)
refs https://github.com/TryGhost/Product/issues/3349

- added conditions to change the url links to point admin X in staff
emails where the user have admin X enabled in Labs.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at e532a0d</samp>

This pull request enables the staff service to support the new admin
settings UI feature flag. It modifies the `StaffServiceEmails` and
`StaffService` modules to use the `labs` dependency and generate the
staff URL accordingly. It also updates the email templates that include
the staff URL.
2023-08-31 16:16:45 +07:00
Djordje Vlaisavljevic
e534e2ee2e
Updated Tips&Donations email design (#17684)
refs https://github.com/TryGhost/Product/issues/3693

- Updated Tips&Donations email subject
- Made member's name bolder
2023-08-10 20:24:42 +01:00
Djordje Vlaisavljevic
aeff42811c
Updated tips & donations settings and email notification design (#17679)
refs https://github.com/TryGhost/Product/issues/3693, https://github.com/TryGhost/Product/issues/3666

- Updated Tips&Donations email notification design to put focus onto the
amount
- Removed unnecessary gap between Free and Premium tiers in Membership
settings
- Improved the copy to better explain the feature
2023-08-10 18:35:42 +01:00
Simon Backx
a407129546
Added memberdata to donation emails (#17676)
no issue
2023-08-10 14:21:29 +02:00
Simon Backx
5462bc0a96 Added email notification for new donations
fixes https://github.com/TryGhost/Product/issues/3692
2023-08-07 16:32:35 +02:00
Fabien "egg" O'Carroll
104f84f252 Added eslint rule for file naming convention
As discussed with the product team we want to enforce kebab-case file names for
all files, with the exception of files which export a single class, in which
case they should be PascalCase and reflect the class which they export.

This will help find classes faster, and should push better naming for them too.

Some files and packages have been excluded from this linting, specifically when
a library or framework depends on the naming of a file for the functionality
e.g. Ember, knex-migrator, adapter-manager
2023-05-09 12:34:34 -04:00
Rishabh Garg
61afa94a4e
Fixed plaintext for mentions email report (#16517)
closes https://github.com/TryGhost/Team/issues/2754

Updates plaintext version for mentions email report to include all unique mentions in a nice list format.
2023-03-29 00:36:05 +05:30
Aileen Nowak
37383fde90 Moved Milestone emails to GA
- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA Moved Milestone emails to GA

- Moves Milestone emails from public beta to GA
2023-03-23 17:35:23 +00:00
Rishabh Garg
ef353db39a
Grouped mentions from same source in email report (#16470)
refs https://github.com/TryGhost/Team/issues/2754

Mentions from same source are already grouped together in Admin UI, with number of links for each source shown in the grouped mention. Similarly, this change updates the grouping of mentions from same source for email reports, removing any duplicate mention source from the report.
2023-03-23 18:18:03 +05:30
Aileen Nowak
5136a9705d Improved Milestone email preview
no issue

- Render first content part instead of subject for preview text
2023-03-22 17:44:14 +00:00
Aileen Booker
8d290c4560
Milestone emails templates and sending implementation (#16318)
refs
https://www.notion.so/ghost/Marketing-Milestone-email-campaigns-1d2c9dee3cfa4029863edb16092ad5c4?pvs=4

- Added email template for milestones with using a configuration file
for different member milestone values, as we're sending different
content for each one
- Implement sending the email to users who have
`milestone-notifications` enabled, currently still behind a flag

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2023-03-21 13:39:40 +00:00
Fabien "egg" O'Carroll
7300130986 Added templates for mention report email 2023-03-15 21:22:13 +05:30
Fabien "egg" O'Carroll
3cf3f633aa Refactored staff-service
This moves the shared data between all templates into a method so that
it's calculated in a single place, as well as exposing separate render
methods for HTML and Text. We've also added some new custom helpers
for use in the handlebars templates
2023-03-15 21:22:13 +05:30
Fabien 'egg' O'Carroll
4525c7293c
Removed email notifications for new mentions
These are no longer desired and will be replaced with a digest style
email.
2023-03-13 18:33:57 +07:00
Rishabh Garg
c71582877c
Added page attribution to member email alerts (#16381)
refs https://github.com/TryGhost/Team/issues/2489

- adds attribution title and url for new free members and paid subscriptions to email alert

---------

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2023-03-10 20:14:53 +05:30
Peter Zimon
d58f01bac7 Refined new signup email templates
refs. https://github.com/TryGhost/Team/issues/2489

- Alignment of avatar in free and paid signup email template was off
- Paragraphs was mixed in free signup email template which resulted in an unwanted space
2023-03-07 14:19:30 +01:00
Rishabh Garg
d6a1d98aca
🎨 Added source attribution info to email alerts (#16360)
refs https://github.com/TryGhost/Team/issues/2489

- adds attribution info for new free and paid members in email alerts
2023-03-06 15:06:47 +05:30
Simon Backx
f6bc3479f9
Added webmentions emails flag (#16321)
fixes https://github.com/TryGhost/Team/issues/2599

Disables sending webmentions notification emails, and hides it behind a new flag instead.
2023-02-23 11:42:14 +01:00
Aileen Booker
e0331bbfcf
Added MilestoneCreatedEvent to staff service notifications (#16307)
refs
https://www.notion.so/ghost/Marketing-Milestone-email-campaigns-1d2c9dee3cfa4029863edb16092ad5c4?pvs=4

- Added MilestoneCreatedEvent subscription to staff-service incl. first
handling
- Logs information for now instead of actually sending an email
2023-02-23 11:20:13 +02:00
Djordje Vlaisavljevic
1b3d19ba81 Updated new mention email template design
refs https://github.com/TryGhost/Team/issues/2491
2023-02-22 15:11:29 +00:00
Ronald Langeveld
76640d9b7e
Added page resources to emails (#16315)
refs https://github.com/TryGhost/Team/issues/2572

- Passes post resource data to emails.
- Updated email templates accordingly.
- Added snapshot e2e tests.
2023-02-22 21:02:15 +08:00
Djordje Vlaisavljevic
34c694529d Added logic for displaying resource type
refs https://github.com/TryGhost/Team/issues/2491
2023-02-21 22:20:12 +00:00
Djordje Vlaisavljevic
88fa56ee37 Updated new mention email template design
refs https://github.com/TryGhost/Team/issues/2491
2023-02-21 22:13:39 +00:00