EmailAddressAsString Property
Gets or sets the full e-mail address (with optional remarks and display name) as a string.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public string AsString { get; set; }

Property Value

Type: String
A string containing all the full e-mail address (including display name and remarks if availalble).
Typical values you can assign to this property:
  • <>
  • John Doe <>
  • "John Doe, Jr." <>
  • "John Doe, Jr." <> (ABC Company)
Once this property is set, the DisplayName, Email and Remarks property values will be updated as well.
This sample creates a new instance of the EmailAddress object and displays the actual e-mail address part (without display name, etc).
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.Mime;

EmailAddress adr = new EmailAddress();

// Set e-mail.
adr.AsString = "\"John Doe\" <>";

// Show the actual e-mail address without any additional information.

// As a result, "" string will be printed in the console window.
See Also