Repository navigation
feat(mail): send a plain-text part and link a hosted web version - #85
Merged
Merged
Conversation
POST /sequences/:id/emails/:emailId/test (and the MCP tool send_sequence_email_test) renders the email exactly like a real send, through the delivery source the send would use, with a [Test] subject. It defaults to the signed-in user, takes up to five addresses, skips suppressed ones and is capped at 50 recipients per team per hour. Tracking tokens carry a contact id that matches nobody and the unsubscribe link uses a test token whose page explains it was a test. The email records lastTestSentAt. The broadcast editor and the full-screen email editor get a Send test dialog. The per-recipient render pipeline moves to mail/campaign.ts so real and test sends share it. Refs #34, #79
Every send now carries a text/plain alternative generated from the final
HTML (links as "text (url)", bulleted lists, no images, styles or
preheader), or the caller's own text for transactional sends (new
optional `text`, stored on the row).
Marketing emails link a hosted web version from the managed footer, also
available as the {{ view_in_browser_url }} merge tag. GET /view/:token
serves it for the signed recipient with their merge data and no
tracking, as a sandboxed document. The editor default no longer starts
with a plain "View in browser" line that linked nowhere.
Refs #35, #79
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #35. Part of #79.
text/plainpart, generated from the final HTML withrenderEmailToPlainText(new in@sendlit/email-editor, built on react-email'stoPlainText): links astext (url),•bullets, no images/styles/preheader, collapsed blank lines. Transactional sends accept their owntext(stored on the row, migration 0011).{{ view_in_browser_url }}.GET /view/:tokenrenders it with the recipient's merge data, without tracking, as a sandboxed (CSPsandbox),noindexdocument; bad links get a friendly 404.@sendlit/email-editorand@sendlit/email-blocks.Testing
View in browser (url),Unsubscribe (url)); the view link opens the personalised web version (no/track/, CSP sandbox) whose unsubscribe link still works; invalid link → "This email is not available"; transactional sends get generated text or the caller's own; the editor lists the new merge tag.