Text & Media

EmailHeading

box.EmailHeading("Welcome!", 1);
box.EmailHeading("Subtitle", 3);

EmailText

box.EmailText(text => text.Text("Regular paragraph text."));
box.EmailTextBlock(block => {
    block.AddLine(line => line.Text("Multiple lines of text in a block."));
});
box.EmailLink("Visit our website", "https://example.com");

EmailImage

box.EmailImage("https://example.com/logo.png")
   .WithAlternativeText("Company Logo")
   .WithWidth(200);

Dark Mode Image Variant

box.EmailImage("logo-light.png")
   .WithDarkModeSource("logo-dark.png");

EmailAvatar

box.EmailAvatar(avatar => {
    avatar.WithSource("https://example.com/photo.jpg", "John Doe")
          .WithSize("56px");
});

box.EmailAvatar("JD", "40px").WithShape(EmailAvatarShape.Circle);

EmailBlockquote

box.EmailBlockquote("This is a quoted text passage.");

EmailPreformatted

box.Add(new EmailPreformatted("Code or pre-formatted text here"));

API Reference