The OpenD Programming Language

EmailRecipient

Structured representation of email users, including the name and email address as separate components.

EmailRecipient represents a single user, and RecipientList represents multiple users. A "recipient" may also be a from or reply to address.

More...

Constructors

this
this(string name, string address)
this(string str)
opAssign
void opAssign(string str)

Construct an EmailRecipient either from a name and address (preferred!) or from an encoded string as found in an email header.

Alias This

toProtocolString

Provided for compatibility for users of old versions of arsd.email - does implicit conversion from EmailRecipient to a plain string (in protocol format), as was present in previous versions of the api.

Members

Functions

toProtocolString
string toProtocolString(string linesep)

Returns a string representing this email address, in a format suitable for inclusion in a message about to be saved or transmitted.

toReadableString
string toReadableString()

Returns a string representing this email address, in a format suitable for being read by people. This is not necessarily reversible.

Variables

address
string address;

The email address. It should not have brackets or any other encoding.

name
string name;

The email user's name. It should not have quotes or any other encoding.

Detailed Description

RecipientList is a wrapper over EmailRecipient[] that provides overloads that take string arguments, for compatibility for users of previous versions of the arsd.email api. It should generally work as you expect if you just pretend it is a normal array though (and if it doesn't, you can get the internal array via the recipients member.)

Meta

History

Added May 13, 2024 (dub v12.0) to replace the old plain, public strings and arrays of strings.