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.5.0 build 687 for .NET 4.5
Syntax
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).
Remarks
Typical values you can assign to this property:
  • jdoe@domain.com
  • <jdoe@domain.com>
  • John Doe <jdoe@domain.com>
  • "John Doe, Jr." <jdoe@domain.com>
  • "John Doe, Jr." <jdoe@domain.com> (ABC Company)
Once this property is set, the DisplayName, Email and Remarks property values will be updated as well.
Examples
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\" <jdoe@domain.com>";

// Show the actual e-mail address without any additional information.
Console.WriteLine(adr.Email);

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