HtmlForgeX

API Reference

Class

EmailConfiguration

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email

Configuration class for Email documents. Manages state, libraries, and settings specific to email generation.

Inheritance

  • Object
  • EmailConfiguration

Constructors

public EmailConfiguration() #

Properties

public EmailLibraryMode LibraryMode { get; set; } #

Gets or sets the library mode for this email document.

public EmailThemeMode ThemeMode { get; set; } #

Gets or sets the theme mode for this email document.

public String Path { get; set; } #

Gets or sets the file path for this email document.

public ConcurrentDictionary<EmailLibraries, Byte> Libraries { get; } #

Collection of libraries registered for this email document. Works as a set to prevent duplicate library registrations.

public Int32 MaxWidth { get; set; } #

Gets or sets the maximum width for the email content (in pixels). Default is 640px which is email standard.

public Boolean DarkModeSupport { get; set; } #

Gets or sets whether dark mode support is enabled.

public Boolean IncludePreheader { get; set; } #

Gets or sets whether to include preheader text.

public String PreheaderText { get; set; } #

Gets or sets the preheader text for email preview.

public Boolean AutoEmbedImages { get; set; } #

Gets or sets whether to automatically embed images as base64 data URIs. When enabled, all EmailImage instances will attempt to embed images unless overridden.

public EmailImageEmbeddingMode ImageEmbeddingMode { get; set; } #

Controls how images are embedded when AutoEmbedImages is enabled.

public Int32 EmbeddingTimeout { get; set; } #

Gets or sets the timeout in seconds for downloading remote images for embedding.

public Boolean OptimizeImages { get; set; } #

Gets or sets whether to automatically optimize images during embedding.

public String DefaultPadding { get; set; } #

Gets or sets the default email layout padding.

public Boolean UseConsistentSpacing { get; set; } #

Gets or sets whether to use consistent spacing between email elements.

public String DefaultBottomMargin { get; set; } #

Gets or sets the default bottom margin applied to elements.

public String SameTypeSpacing { get; set; } #

Gets or sets the spacing used between siblings of the same type.

public Boolean RemoveLastChildMargin { get; set; } #

Determines whether the last child margin is removed when spacing is automatic.

public Boolean SmartImageDetection { get; set; } #

Gets or sets whether to automatically detect and handle file paths vs URLs in images.

public Boolean IncludeFallbackImages { get; set; } #

Gets or sets whether to include fallback images for email clients that don't support base64.

public Int64 MaxEmbedFileSize { get; set; } #

Gets or sets the maximum file size (in bytes) for automatic image embedding. Images larger than this will not be embedded automatically.

public Boolean LogEmbeddingWarnings { get; set; } #

Gets or sets whether to log warnings when image embedding fails.

public RoundingMode DefaultRounding { get; set; } #

Controls how border radius is applied when not explicitly set.

public String DefaultBorderRadius { get; set; } #

Default border-radius value used when DefaultRounding is Auto.