System.Net.Mail.AlternateView Class

Represents the format to view an email message.

See Also: AlternateView Members

Syntax

public class AlternateView : AttachmentBase

Remarks

Use the System.Net.Mail.AlternateView class to specify copies of an e-mail message in different formats. For example, if you send a message in HTML, you might also want provide a plain text version in case some of the recipients use e-mail readers that cannot display HTML content.

This class has two properties AlternateView.LinkedResources and AlternateView.BaseUri that are used to resolve URLs within the content of the email. AlternateView.LinkedResources is a collection of System.Net.Mail.LinkedResource objects. When rendered, URLs within the e-mail's content are first matched against the URLs in the LinkedResource.ContentLink of each System.Net.Mail.LinkedResource object in the AlternateView.LinkedResources collection, and resolved. AlternateView.BaseUri is used by the mail reader to resolve relative URLs within the body, and also to resolve relative LinkedResource.ContentLink URLs, in the AlternateView.LinkedResources collection.

Requirements

Namespace: System.Net.Mail
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0