AddWithNameAndSmtpAddress method

EmailAddress AddWithNameAndSmtpAddress(
  1. String name,
  2. String smtpAddress
)
Adds an e-mail address to the collection. The name used to initialize the e-mail address. The SMTP address used to initialize the e-mail address.

Implementation

EmailAddress AddWithNameAndSmtpAddress(String name, String smtpAddress) {
  EmailAddress emailAddress =
      new EmailAddress(name: name, smtpAddress: smtpAddress);

  this.Add(emailAddress);

  return emailAddress;
}