diff --git a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx index 05d23ba2ca..a8d4ee3b5c 100644 --- a/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx +++ b/apps/admin-x-settings/src/components/settings/email/newsletters/NewsletterPreviewContent.tsx @@ -3,6 +3,7 @@ import LatestPosts1 from '../../../../assets/images/latest-posts-1.png'; import LatestPosts2 from '../../../../assets/images/latest-posts-2.png'; import LatestPosts3 from '../../../../assets/images/latest-posts-3.png'; import clsx from 'clsx'; +import useFeatureFlag from '../../../../hooks/useFeatureFlag'; import {GhostOrb, Icon} from '@tryghost/admin-x-design-system'; import {isManagedEmail} from '@tryghost/admin-x-framework/api/config'; import {textColorForBackgroundColor} from '@tryghost/color-utils'; @@ -71,6 +72,7 @@ const NewsletterPreviewContent: React.FC<{ }) => { const showHeader = headerIcon || headerTitle; const {config} = useGlobalData(); + const hasNewEmailAddresses = useFeatureFlag('newEmailAddresses'); const currentDate = new Date().toLocaleDateString('default', { year: 'numeric', @@ -83,15 +85,15 @@ const NewsletterPreviewContent: React.FC<{ let emailHeader; - if (!isManagedEmail(config)) { - emailHeader = <>

{senderName} {senderEmail}

-

To: Jamie Larson jamie@example.com

; - } else { + if ({hasNewEmailAddresses} || isManagedEmail(config)) { emailHeader = <>

From: {senderName} ({senderEmail})

Reply-to: {senderReplyTo ? senderReplyTo : 'Not set' }

; + } else { + emailHeader = <>

{senderName} {senderEmail}

+

To: Jamie Larson jamie@example.com

; } return (