Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Improve PKI alert email layout
Carlos Monastyrskie5cf5167a810
diff --git a/backend/src/services/pki-alert-v2/pki-alert-v2-service.ts b/backend/src/services/pki-alert-v2/pki-alert-v2-service.tsindex bbc4ff4a62..2deb18c62f 100644--- a/backend/src/services/pki-alert-v2/pki-alert-v2-service.ts+++ b/backend/src/services/pki-alert-v2/pki-alert-v2-service.ts@@ -464,7 +464,7 @@ export const pkiAlertV2ServiceFactory = ({return smtpService.sendMail({recipients: config.recipients,- subjectLine: `Infisical PKI Alert: ${alertName}`,+ subjectLine: `Infisical Certificate Alert - ${alertName}`,substitutions: {alertName,alertBeforeDays,diff --git a/backend/src/services/smtp/emails/PkiExpirationAlertTemplate.tsx b/backend/src/services/smtp/emails/PkiExpirationAlertTemplate.tsxindex af66561871..f7a89f4e14 100644--- a/backend/src/services/smtp/emails/PkiExpirationAlertTemplate.tsx+++ b/backend/src/services/smtp/emails/PkiExpirationAlertTemplate.tsx@@ -29,32 +29,23 @@ export const PkiExpirationAlertTemplate = ({}};- const daysText = alertBeforeDays === 1 ? "1 day" : `${alertBeforeDays} days`;const certificateText = items.length === 1 ? "certificate" : "certificates";+ const daysText = alertBeforeDays === 1 ? "1 day" : `${alertBeforeDays} days`;++ const message = `Alert ${alertName}: You have ${items.length === 1 ? "one" : items.length} ${certificateText} that will expire in ${daysText}.`;return (- <BaseEmailWrapper- title="Certificate Expiration Notice"- preview={`${items.length} ${certificateText} expiring in ${daysText}`}- siteUrl={siteUrl}- >+ <BaseEmailWrapper title="Certificate Expiration Notice" preview={message} siteUrl={siteUrl}><Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0">- <strong>Certificate expiration notice</strong>+ <strong>Certificate Expiration Notice</strong></Heading><Section className="px-[24px] mb-[28px] mt-[36px] pt-[12px] pb-[8px] border border-solid border-gray-200 rounded-md bg-gray-50"><Text className="text-[14px]">- You have{" "}- <strong>- {items.length} {certificateText}- </strong>{" "}- expiring in {daysText}.- </Text>- <Text className="text-[14px]">- Alert: <strong>{alertName}</strong>+ Alert <strong className="font-semibold">{alertName}</strong>: You have{" "}+ {items.length === 1 ? "one" : items.length} {certificateText} that will expire in {daysText}.</Text></Section>-<Section className="mb-[28px]"><Text className="text-[14px] font-semibold mb-[12px]">Expiring certificates:</Text>{items.map((item) => (