Email Address

The ContactEmailAddress model represents an email address associated with a contact in the ContactsManager SDK.

Properties

  • emailId: String - Unique identifier for the email address entry
  • value: String? - The actual email address
  • type: String? - The type or label for the email address (work, personal, other)
  • emoji: String? - An emoji icon associated with this email address
  • contact: Contact? - Reference to the parent contact that owns this email address

Usage Example

// Create an email address
let emailAddress = ContactEmailAddress(
    contactId: "contact-123",
    value: "john.doe@example.com",
    type: "work",
    emoji: "💼"
)

// Add to a contact
contact.emailAddresses.append(emailAddress)

// Access from a contact
if let firstEmail = contact.emailAddresses.first {
    print("Email: \(firstEmail.value ?? "None") (\(firstEmail.type ?? "Unknown"))")
}