HtmlForgeX

API Reference

Class

EmailHeader

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email

Represents a flexible email header section that works like Body. Users can directly call email.Header.EmailRow(), email.Header.EmailContent(), etc.

Inheritance

Constructors

public EmailHeader() #

Initializes a new instance of the EmailHeader class.

Methods

PropagateEmailReference(HtmlForgeX.Email.Element element, HtmlForgeX.Email.Email email) #

Recursively propagates the Email reference to an element and all its children.

Parameters

element HtmlForgeX.Email.Element required
The element to propagate to.
email HtmlForgeX.Email.Email required
The Email instance to propagate.
public override String ToString() #
Returns: String

Converts the EmailHeader to its HTML representation.

Returns

HTML string representing the email header.

WithBackground 2 overloads
public EmailHeader WithBackground(RGBColor color) #
Returns: EmailHeader

Sets the header background color.

Parameters

color System.String requiredposition: 0
The background color.

Returns

The EmailHeader object, allowing for method chaining.

WithBackground(HtmlForgeX.Email.RGBColor color) #

Sets the header background color.

Parameters

color HtmlForgeX.Email.RGBColor required
The background color.

Returns

The EmailHeader object, allowing for method chaining.

Properties

public String BackgroundColor { get; set; } #

Gets or sets the background color for the header section.