EmailAddressAsString Property |
Gets or sets the full e-mail address (with optional remarks and display name) as a string.
Namespace: MailBee.MimeAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public string AsString { get; set; }
Public Property AsString As String
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).
using MailBee;
using MailBee.Mime;
EmailAddress adr = new EmailAddress();
adr.AsString = "\"John Doe\" <jdoe@domain.com>";
Console.WriteLine(adr.Email);
Imports MailBee
Imports MailBee.Mime
Dim adr = New EmailAddress
adr.AsString = """John Doe"" <jdoe@domain.com>"
Console.WriteLine(adr.Email)
See Also