Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix: improve email templates (#2161)
Peter Chinman07b1058d21bb
diff --git a/rust/cloud-storage/email_formatting/preview_digest.py b/rust/cloud-storage/email_formatting/preview_digest.pynew file mode 100644index 0000000000..58f6d0be00--- /dev/null+++ b/rust/cloud-storage/email_formatting/preview_digest.py@@ -0,0 +1,118 @@+#!/usr/bin/env python3+"""+Preview script for digest.html — renders the Askama template with dummy data+using Jinja2 (which has nearly identical syntax) and opens it in a browser.+"""++import re+import sys+import tempfile+import webbrowser+from datetime import datetime, timezone+from pathlib import Path++try:+ from jinja2 import Environment+except ImportError:+ print("jinja2 not found. Install it with: pip3 install jinja2")+ sys.exit(1)++TEMPLATE_PATH = Path(__file__).parent / "templates" / "digest.html"++# ---------------------------------------------------------------------------+# Dummy data+# ---------------------------------------------------------------------------+++class NotifPreview:+ def __init__(self, title: str, body: str, created_at: datetime):+ self.title = title+ self.body = body+ self._created_at = created_at++ # Askama calls notif.created_at.format(…); in the converted template we+ # expose a pre-formatted string instead (see the regex below).+ @property+ def created_at_formatted(self) -> str:+ return self._created_at.strftime("%Y-%m-%d")+++DUMMY_NOTIFS = [+ NotifPreview(+ title="Alice commented on your document",+ body="Looks great — just left a few notes on the introduction section. Hey @you, can you take a look. Q2 financial projections. Looks great — just left a few notes on the introduction section. Hey @you, can you take a look. Q2 financial projections.",+ created_at=datetime(2025, 6, 10, tzinfo=timezone.utc),+ ),+ NotifPreview(+ title="Bob shared a file with you",+ body="Q2 financial projections (v3).xlsx has been shared with your team. Q2 financial projections (v3).xlsx has been shared with your team.",+ created_at=datetime(2025, 6, 9, tzinfo=timezone.utc),+ ),+ NotifPreview(+ title="Carol mentioned you in a comment",+ body="Hey @you, can you take a look at the design spec before Friday?",+ created_at=datetime(2025, 6, 8, tzinfo=timezone.utc),+ ),+]++# ---------------------------------------------------------------------------+# Askama → Jinja2 syntax conversion+# ---------------------------------------------------------------------------+++def askama_to_jinja2(src: str) -> str:+ """Apply lightweight regex transforms to make the Askama template+ renderable by Jinja2."""++ # notifs.len() → notifs|length+ src = re.sub(r"\bnotifs\.len\(\)", "notifs|length", src)++ # notif.created_at.format("…") → notif.created_at_formatted+ # (we pre-format the date in Python instead)+ src = re.sub(+ r'notif\.created_at\.format\("[^"]*"\)',+ "notif.created_at_formatted",+ src,+ )++ # Askama uses `!expr` for logical negation; Jinja2 uses `not expr`+ # Only touch it inside block tags ({% … %})+ def replace_bang(m: re.Match) -> str:+ return m.group(0).replace("!", "not ")++ src = re.sub(r"\{%-?\s*if\s+![^%]+%\}", replace_bang, src)++ return src+++# ---------------------------------------------------------------------------+# Render & open+# ---------------------------------------------------------------------------+++def main() -> None:+ raw = TEMPLATE_PATH.read_text(encoding="utf-8")+ converted = askama_to_jinja2(raw)++ env = Environment(autoescape=False)+ tmpl = env.from_string(converted)++ html = tmpl.render(notifs=DUMMY_NOTIFS)++ # Write to a temp file that persists until the script exits+ with tempfile.NamedTemporaryFile(+ mode="w",+ suffix=".html",+ prefix="digest_preview_",+ delete=False,+ encoding="utf-8",+ ) as f:+ f.write(html)+ tmp_path = f.name++ print(f"Rendered to: {tmp_path}")+ webbrowser.open(f"file://{tmp_path}")+++if __name__ == "__main__":+ main()diff --git a/rust/cloud-storage/email_formatting/templates/digest.html b/rust/cloud-storage/email_formatting/templates/digest.htmlindex 32fccc34ce..36d18b2a4e 100644--- a/rust/cloud-storage/email_formatting/templates/digest.html+++ b/rust/cloud-storage/email_formatting/templates/digest.html@@ -18,6 +18,11 @@</xml></noscript><![endif]-->++ <link rel="preconnect" href="https://fonts.googleapis.com">+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>+ <link href="https://fonts.googleapis.com/css2?family=Inter:opsz,[email protected],500&display=swap" rel="stylesheet">+<style type="text/css">@font-face {src: url("https://pub-4030931feb3e4212b2ac93166a411ea7.r2.dev/berkley.woff2")@@ -25,11 +30,6 @@font-family: "Berkeley Mono";font-display: fallback;}- @font-face {- src: url('https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap');- font-family: "Inter";- font-display: fallback;- }</style></head><body@@ -47,13 +47,12 @@font-family:"Berkeley Mono", "Courier New", Courier,monospace;- background-color: #090909;- border: 1px solid #333333;+ background-color: #fcfcfc;+ border: 1px solid #e0e0e0;box-sizing: border-box;border-radius: 4px;max-width: 570px;overflow: hidden;- color: #090909;font-size: 15px;margin: 0 auto;width: 100%;@@ -61,22 +60,23 @@><divstyle="- background-color: #202020;- color: #eee2dc;+ background-color: #f5f5f5;+ color: #090909;box-sizing: border-box;line-height: 60px;- font-size: 20px;+ font-size: 18px;padding: 0 20px;height: 60px;width: 100%;font-family: "Inter", sans-serif;">- You have {{ notifs.len() }} unread {% if notifs.len() == 1 %}message{% else %}messages{% endif %}+ You have {{ notifs.len() }} unread {% if notifs.len() == 1 %}message{%+ else %}messages{% endif %}</div><hrstyle="- border-top: 1px dashed #333333;+ border-top: 1px dashed #e0e0e0;border-bottom: none;border-right: none;border-left: none;@@ -90,7 +90,7 @@text-decoration: none;padding: 10px 17px;display: block;- color: #af9a8d;+ color: #090909;"href="https://macro.com"target="_blank"@@ -120,15 +120,21 @@"></div></td>- <td style="vertical-align: middle; color: #aaaaa; font-size: 16px;">+ <td+ style="+ vertical-align: middle;+ color: #636363;+ font-size: 16px;+ "+ >{{ notif.title }}</td><tdstyle="vertical-align: middle;text-align: right;- color: #af9a8d;- font-size: 16px;+ color: #636363;+ font-size: 12px;white-space: nowrap;padding-left: 10px;"@@ -149,9 +155,10 @@style="padding-left: 22px;padding-top: 2px;- color: #af9a8d;+ color: #090909;font-size: 16px;font-family: "Inter", sans-serif;+ line-height: 1.4;">{{ notif.body }}@@ -163,7 +170,7 @@{% if !loop.last %}<hrstyle="- border-top: 1px dashed #333;+ border-top: 1px dashed #e0e0e0;border-bottom: none;border-right: none;border-left: none;@@ -174,7 +181,7 @@<hrstyle="- border-top: 1px dashed #333;+ border-top: 1px dashed #e0e0e0;border-bottom: none;border-right: none;border-left: none;@@ -207,7 +214,7 @@white-space: nowrap;border-radius: 2px;width: min-content;- padding: 2px 10px;+ padding: 4px 10px;color: #090909;"href="https://macro.com"diff --git a/rust/cloud-storage/referral/.sqlx/query-5bb9c628efd6afd6b7858e11b0f470fdaf0bbd407265fabd04e1201cd3754809.json b/rust/cloud-storage/referral/.sqlx/query-5bb9c628efd6afd6b7858e11b0f470fdaf0bbd407265fabd04e1201cd3754809.jsonnew file mode 100644index 0000000000..5c4bb33e1d--- /dev/null+++ b/rust/cloud-storage/referral/.sqlx/query-5bb9c628efd6afd6b7858e11b0f470fdaf0bbd407265fabd04e1201cd3754809.json@@ -0,0 +1,28 @@+{+ "db_name": "PostgreSQL",+ "query": "\n SELECT\n CASE\n WHEN mui.profile_picture IS NOT NULL AND mui.profile_picture != ''\n THEN mui.profile_picture\n ELSE NULL\n END AS \"profile_picture_url?: String\",\n NULLIF(TRIM(CONCAT_WS(' ', NULLIF(first_name, 'N/A'), NULLIF(last_name, 'N/A'))), '') AS \"display_name?: String\"\n FROM macro_user_info mui\n JOIN \"User\" u ON u.macro_user_id = mui.macro_user_id\n WHERE u.id = $1\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "profile_picture_url?: String",+ "type_info": "Text"+ },+ {+ "ordinal": 1,+ "name": "display_name?: String",+ "type_info": "Text"+ }+ ],+ "parameters": {+ "Left": [+ "Text"+ ]+ },+ "nullable": [+ null,+ null+ ]+ },+ "hash": "5bb9c628efd6afd6b7858e11b0f470fdaf0bbd407265fabd04e1201cd3754809"+}diff --git a/rust/cloud-storage/referral/src/domain/ports.rs b/rust/cloud-storage/referral/src/domain/ports.rsindex cc70875c5f..2d810aaf8d 100644--- a/rust/cloud-storage/referral/src/domain/ports.rs+++ b/rust/cloud-storage/referral/src/domain/ports.rs@@ -7,6 +7,7 @@ use macro_user_id::{lowercased::Lowercase,user_id::{MacroUserId, MacroUserIdStr},};+use std::future::Future;use crate::domain::models::{ReferralCode, ReferralError};@@ -51,6 +52,13 @@ pub trait ReferralRepo: Send + Sync + 'static {&self,referral_code: &ReferralCode,) -> impl Future<Output = Result<String, Self::Err>> + Send;++ /// Gets the sender's profile picture URL and display name in a single query.+ /// Returns `(profile_picture_url, display_name)`, either of which may be `None`.+ fn get_sender_info<'a>(+ &self,+ user_id: &MacroUserId<Lowercase<'a>>,+ ) -> impl Future<Output = Result<(Option<String>, Option<String>), Self::Err>> + Send;}/// Repository to handle applying discounts to the referrer when a referral isdiff --git a/rust/cloud-storage/referral/src/domain/service.rs b/rust/cloud-storage/referral/src/domain/service.rsindex 10393bbd77..effe3a5bbd 100644--- a/rust/cloud-storage/referral/src/domain/service.rs+++ b/rust/cloud-storage/referral/src/domain/service.rs@@ -6,7 +6,7 @@ mod test;use std::{collections::HashSet, ops::Deref};use macro_user_id::{- email::EmailStr,+ email::{EmailStr, ReadEmailParts},lowercased::Lowercase,user_id::{MacroUserId, MacroUserIdStr},};@@ -106,9 +106,23 @@ impl<) -> Result<(), ReferralError> {let referral_code = self.get_referral_code_for_user(&sending_user.0).await?;+ let (sender_profile_picture_url, sender_name) = self+ .repo+ .get_sender_info(&sending_user.0)+ .await+ .unwrap_or_else(|e| {+ tracing::warn!(error=?e, "failed to fetch sender info");+ (None, None)+ });++ let sender_email = Some(sending_user.email_part().email_str().to_string());+let notification = InviteToMacro {recipient_email: recipient.clone(),referral_code,+ sender_profile_picture_url,+ sender_name,+ sender_email,};let _res = selfdiff --git a/rust/cloud-storage/referral/src/domain/service/test.rs b/rust/cloud-storage/referral/src/domain/service/test.rsindex 10220fbb45..3e05ef0fb6 100644--- a/rust/cloud-storage/referral/src/domain/service/test.rs+++ b/rust/cloud-storage/referral/src/domain/service/test.rs@@ -48,6 +48,8 @@ fn mock_repo() -> MockReferralRepo {repo.expect_get_referral_code_for_user().returning(|_| {Box::pin(async { Ok(referral_invitation::ReferralCode("TESTCODE".to_string())) })});+ repo.expect_get_sender_info()+ .returning(|_| Box::pin(async { Ok((None, None)) }));repo}diff --git a/rust/cloud-storage/referral/src/outbound/pg_referral_repo.rs b/rust/cloud-storage/referral/src/outbound/pg_referral_repo.rsindex 315d9fe231..3770a8a62e 100644--- a/rust/cloud-storage/referral/src/outbound/pg_referral_repo.rs+++ b/rust/cloud-storage/referral/src/outbound/pg_referral_repo.rs@@ -164,4 +164,31 @@ impl ReferralRepo for PgReferralRepo {.fetch_one(&self.pool).await}++ #[tracing::instrument(skip(self), err)]+ async fn get_sender_info<'a>(+ &self,+ user_id: &MacroUserId<Lowercase<'a>>,+ ) -> Result<(Option<String>, Option<String>), Self::Err> {+ let row = sqlx::query!(+ r#"+ SELECT+ CASE+ WHEN mui.profile_picture IS NOT NULL AND mui.profile_picture != ''+ THEN mui.profile_picture+ ELSE NULL+ END AS "profile_picture_url?: String",+ NULLIF(TRIM(CONCAT_WS(' ', NULLIF(first_name, 'N/A'), NULLIF(last_name, 'N/A'))), '') AS "display_name?: String"+ FROM macro_user_info mui+ JOIN "User" u ON u.macro_user_id = mui.macro_user_id+ WHERE u.id = $1+ "#,+ user_id.as_ref()+ )+ .fetch_optional(&self.pool)+ .await?+ .map(|r| (r.profile_picture_url, r.display_name));++ Ok(row.unwrap_or((None, None)))+ }}diff --git a/rust/cloud-storage/referral_invitation/preview_invite.py b/rust/cloud-storage/referral_invitation/preview_invite.pynew file mode 100644index 0000000000..32b40ed048--- /dev/null+++ b/rust/cloud-storage/referral_invitation/preview_invite.py@@ -0,0 +1,84 @@+#!/usr/bin/env python3+"""+Preview script for invite.html — renders the Askama template with dummy data+using Jinja2 (which has nearly identical syntax) and opens it in a browser.+"""++import re+import sys+import tempfile+import webbrowser+from pathlib import Path++try:+ from jinja2 import Environment+except ImportError:+ print("jinja2 not found. Install it with: pip3 install jinja2")+ sys.exit(1)++TEMPLATE_PATH = Path(__file__).parent / "templates" / "invite.html"++# ---------------------------------------------------------------------------+# Dummy data+# ---------------------------------------------------------------------------++DUMMY_REFERRAL_URL = "http://localhost:3000/app/signup?referral_code=ABC123DEF"++# ---------------------------------------------------------------------------+# Askama → Jinja2 syntax conversion+# ---------------------------------------------------------------------------+++def askama_to_jinja2(src: str) -> str:+ """Apply lightweight regex transforms to make the Askama template+ renderable by Jinja2."""++ # referral_url() is a method call on self in Askama; replace with the+ # dummy URL string directly so Jinja2 can render it as a plain variable.+ src = re.sub(r"\{\{\s*referral_url\(\)\s*\}\}", DUMMY_REFERRAL_URL, src)++ # {% if let Some(var) = expr %} → {% if expr %}{% set var = expr %}+ # Jinja2 doesn't have if-let, but {% set %} inside {% if %} achieves the same.+ src = re.sub(+ r"\{%-?\s*if let Some\((\w+)\)\s*=\s*(\w+)\s*-?%\}",+ r"{% if \2 %}{% set \1 = \2 %}",+ src,+ )++ return src+++# ---------------------------------------------------------------------------+# Render & open+# ---------------------------------------------------------------------------+++def main() -> None:+ raw = TEMPLATE_PATH.read_text(encoding="utf-8")+ converted = askama_to_jinja2(raw)++ env = Environment(autoescape=False)+ tmpl = env.from_string(converted)++ html = tmpl.render(+ sender_profile_picture_url="https://placehold.co/40x40/888888/ffffff", # set to None to test the email-only fallback path+ sender_name="Peter Chinman", # set to None to test the email-only fallback path+ sender_email="[email protected]",+ )++ with tempfile.NamedTemporaryFile(+ mode="w",+ suffix=".html",+ prefix="invite_preview_",+ delete=False,+ encoding="utf-8",+ ) as f:+ f.write(html)+ tmp_path = f.name++ print(f"Rendered to: {tmp_path}")+ webbrowser.open(f"file://{tmp_path}")+++if __name__ == "__main__":+ main()diff --git a/rust/cloud-storage/referral_invitation/src/lib.rs b/rust/cloud-storage/referral_invitation/src/lib.rsindex d7e8fdd5af..22eb273388 100644--- a/rust/cloud-storage/referral_invitation/src/lib.rs+++ b/rust/cloud-storage/referral_invitation/src/lib.rs@@ -30,6 +30,13 @@ pub struct InviteToMacro {/// The referral code which is templated into the email to track the sender/// and reward them.pub referral_code: ReferralCode,+ /// The sender's profile picture URL, if available.+ pub sender_profile_picture_url: Option<String>,+ /// The sender's display name, if they have set one.+ pub sender_name: Option<String>,+ /// The sender's email address.+ #[serde(default)]+ pub sender_email: Option<String>,}impl InviteToMacro {@@ -62,8 +69,13 @@ fn get_url(env: Environment, code: &ReferralCode) -> Url {impl NotificationExtEmail for InviteToMacro {fn format_email(&self) -> EmailContent {+ let sender = self+ .sender_name+ .as_deref()+ .or(self.sender_email.as_deref())+ .unwrap_or("A Macro user");EmailContent {- subject: "You have been invited to join Macro".to_string(),+ subject: format!("{} has invited you to join Macro", sender),body: self.render().expect("InviteToMacro template render failed in format_email"),diff --git a/rust/cloud-storage/referral_invitation/src/test.rs b/rust/cloud-storage/referral_invitation/src/test.rsindex 51e987064a..8b0634bee4 100644--- a/rust/cloud-storage/referral_invitation/src/test.rs+++ b/rust/cloud-storage/referral_invitation/src/test.rs@@ -2,8 +2,11 @@ use super::*;fn make_invite() -> InviteToMacro {InviteToMacro {- recipient_email: EmailStr::try_from("[email protected]".to_string()).unwrap(),+ recipient_email: EmailStr::try_from("[email protected]".to_string()).unwrap(),referral_code: ReferralCode("ABC123".to_string()),+ sender_profile_picture_url: None,+ sender_name: Some("Test User".to_string()),+ sender_email: Some("[email protected]".to_string()),}}@@ -30,18 +33,42 @@ fn get_url_all_environments() {}#[test]-fn format_email_does_not_panic() {+fn format_email_with_sender_name() {let invite = make_invite();let referral_url = invite.referral_url().to_string();let email = invite.format_email();- assert!(!email.subject.is_empty());- assert!(!email.body.is_empty());+ assert_eq!(email.subject, "Test User has invited you to join Macro");assert!(email.body.contains(&referral_url),"email body should contain the referral URL");}+#[test]+fn format_email_falls_back_to_email_when_no_name() {+ let invite = InviteToMacro {+ sender_name: None,+ ..make_invite()+ };+ let email = invite.format_email();+ assert_eq!(+ email.subject,+ "[email protected] has invited you to join Macro"+ );+ assert!(email.body.contains("[email protected]"));+}++#[test]+fn format_email_falls_back_to_generic_when_no_name_or_email() {+ let invite = InviteToMacro {+ sender_name: None,+ sender_email: None,+ ..make_invite()+ };+ let email = invite.format_email();+ assert_eq!(email.subject, "A Macro user has invited you to join Macro");+}+#[test]fn rate_limit_config_does_not_panic() {let config = InviteToMacro::rate_limit_config();@@ -62,3 +89,15 @@ fn serialization_roundtrip() {let deserialized: InviteToMacro = serde_json::from_str(&json).unwrap();assert_eq!(deserialized.referral_code.0, "ABC123");}++#[test]+fn deserialization_without_sender_email_uses_none() {+ let json = r#"{+ "recipient_email": "[email protected]",+ "referral_code": "ABC123",+ "sender_profile_picture_url": null,+ "sender_name": "Test User"+ }"#;+ let deserialized: InviteToMacro = serde_json::from_str(json).unwrap();+ assert!(deserialized.sender_email.is_none());+}diff --git a/rust/cloud-storage/referral_invitation/templates/invite.html b/rust/cloud-storage/referral_invitation/templates/invite.htmlindex a393345854..393176ca26 100644--- a/rust/cloud-storage/referral_invitation/templates/invite.html+++ b/rust/cloud-storage/referral_invitation/templates/invite.html@@ -7,56 +7,51 @@<head><title>You're Invited to Macro</title><!--[if !mso]><!-->- <meta- http-equiv="X-UA-Compatible"- content="IE=edge"- >+ <meta http-equiv="X-UA-Compatible" content="IE=edge" /><!--<![endif]-->- <meta- content="text/html; charset=UTF-8"- http-equiv="Content-Type"- >- <meta- content="width=device-width, initial-scale=1"- name="viewport"- >+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />+ <meta content="width=device-width, initial-scale=1" name="viewport" /><!--[if mso]>- <noscript>- <xml>- <o:OfficeDocumentSettings>- <o:AllowPNG/>- <o:PixelsPerInch>96</o:PixelsPerInch>- </o:OfficeDocumentSettings>- </xml>- </noscript>+ <noscript>+ <xml>+ <o:OfficeDocumentSettings>+ <o:AllowPNG />+ <o:PixelsPerInch>96</o:PixelsPerInch>+ </o:OfficeDocumentSettings>+ </xml>+ </noscript><![endif]--><!--[if lte mso 11]>- <style type="text/css">- .mj-outlook-group-fix { width:100% !important; }- </style>+ <style type="text/css">+ .mj-outlook-group-fix {+ width: 100% !important;+ }+ </style><![endif]-->++ <link rel="preconnect" href="https://fonts.googleapis.com">+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>+ <link href="https://fonts.googleapis.com/css2?family=Inter:opsz,[email protected],500&display=swap" rel="stylesheet">+<style type="text/css">@font-face {- font-family: 'Berkeley Mono';- src: url('https://pub-4030931feb3e4212b2ac93166a411ea7.r2.dev/berkley.woff2') format('woff2');+ font-family: "Berkeley Mono";+ src: url("https://pub-4030931feb3e4212b2ac93166a411ea7.r2.dev/berkley.woff2")+ format("woff2");font-display: fallback;}- #outlook a{+ #outlook a {padding: 0;}- img{+ img {-ms-interpolation-mode: bicubic;text-decoration: none;line-height: 100%;outline: none;height: auto;- border:0;- }-- .berkeley-font {- font-family: 'Berkeley Mono', 'Courier New', Courier, monospace !important;+ border: 0;}</style></head>@@ -69,20 +64,14 @@margin: 0;">- <div- class="berkeley-font"- style="- box-sizing: border-box;- padding: 60px 20px;- width: 100%;- "- >+ <div style="box-sizing: border-box; padding: 60px 20px; width: 100%"><div- class="berkeley-font"style="- font-family: 'Berkeley Mono', 'Courier New', Courier, monospace;- background-color: #111;- border: 1px solid #444;+ font-family:+ "Berkeley Mono", "Courier New", Courier,+ monospace;+ background-color: #fcfcfc;+ border: 1px solid #e0e0e0;box-sizing: border-box;border-radius: 4px;max-width: 570px;@@ -93,53 +82,98 @@width: 100%;">- <div- class="berkeley-font"+ <table+ cellpadding="0"+ cellspacing="0"style="- font-family: 'Berkeley Mono', 'Courier New', Courier, monospace;- background-color: #222;+ font-family: "Inter", sans-serif;+ background-color: #f5f5f5;+ color: #090909;box-sizing: border-box;- line-height: 60px;- font-size: 17px;- padding: 0 20px;- height: 60px;+ font-size: 18px;+ padding: 10px 20px;width: 100%;+ border: none;">+ <tbody>+ <tr>+ {% if let Some(url) = sender_profile_picture_url %}+ <td+ style="+ vertical-align: middle;+ width: 40px;+ min-width: 40px;+ padding-right: 8px;+ "+ >+ <div+ style="+ border: 1px solid #e0e0e0;+ box-sizing: border-box;+ border-radius: 20px;+ overflow: clip;+ height: 40px;+ width: 40px;+ "+ >+ <img+ src="{{ url }}"+ alt=""+ style="+ width: 100%;+ height: 100%;+ object-fit: cover;+ display: block;+ "+ />+ </div>+ </td>+ {% endif %}+ <td style="vertical-align: middle; line-height: 1.2">+ {% if let Some(name) = sender_name %}{{ name }}{% else %}{% if let Some(email) = sender_email %}<span+ style="+ color: #626262;+ font-family:+ "Berkeley Mono", "Courier New",+ Courier, monospace;+ "+ ><{{ email }}></span+ >{% else %}A Macro user{% endif %}{% endif %} has invited you to Macro+ </td>+ </tr>+ </tbody>+ </table>+ <hr style="border: none; border-top: 1px dashed #e0e0e0; margin: 0" />+ <div style="box-sizing: border-box; padding: 20px"><divstyle="- border: 1px solid #444;- vertical-align: middle;- box-sizing: border-box;- display: inline-block;- border-radius: 20px;- margin-right: 3px;- overflow: clip;- height: 40px;- width: 40px;+ color: #090909;+ font-size: 16px;+ font-family: "Inter", sans-serif;+ line-height: 1.4;">- <!--user-profile-icon-->- </div>- User has invited you to Macro- </div>- <hr- style="- border: none;- border-top: 1px dashed #444;- margin: 0;- "- />- <div- class="berkeley-font"- style="- font-family: 'Berkeley Mono', 'Courier New', Courier, monospace;- box-sizing: border-box;- padding: 20px;- "- >- <div>- User has invited you to join them on Macro. Collaborate on documents. Stay in sync with tasks. Search over everything. AI Assistance with anything.+ {% if let Some(name) = sender_name %}{{ name }}{% if let Some(email) = sender_email %}+ <span+ style="+ color: #626262;+ font-family:+ "Berkeley Mono", "Courier New", Courier,+ monospace;+ "+ ><{{ email }}></span+ >{% endif %}{% else %}{% if let Some(email) = sender_email %}<span+ style="+ color: #626262;+ font-family:+ "Berkeley Mono", "Courier New", Courier,+ monospace;+ "+ ><{{ email }}></span+ >{% else %}A Macro user{% endif %}{% endif %} has invited you to join them on Macro. Collaborate on+ documents. Stay in sync with tasks. Search over everything. AI+ Assistance with anything.</div><table@@ -162,21 +196,24 @@"><a- class="berkeley-font"style="- font-family: 'Berkeley Mono', 'Courier New', Courier, monospace;- background-color: #f04;+ font-family:+ "Berkeley Mono", "Courier New",+ Courier, monospace;+ background-color: #ff8f00;text-decoration: none;display: inline-block;white-space: nowrap;+ border-radius: 2px;width: min-content;- padding: 2px 10px;- color: #111;+ padding: 4px 10px;+ color: #090909;"href="{{ referral_url() }}"target="_blank">- Join User+ Join {% if let Some(name) = sender_name %}{{ name }}{% else+ %}{% if let Some(email) = sender_email %}{{ email }}{% else %}Macro{% endif %}{% endif %}</a></td><td@@ -187,7 +224,17 @@width: 50%;">- <!--macro-logo-anim-->+ <img+ src="https://static-file-service.macro.com/file/b911aba9-94a6-435c-aa16-8404739f13b0"+ alt="Macro"+ style="+ -ms-interpolation-mode: bicubic;+ line-height: 100%;+ outline: none;+ width: 60px;+ border: 0;+ "+ /></td></tr></tbody>