---
schema_version: "1"
id: 02eab65dcc7d9f5ddf3ae2972995d6efe23db01f03578786992c6368b154f245
title: EmailMessageRelation
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_emailmessagerelation.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_emailmessagerelation.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: e74effcd3c54b37492bad928934903cf776a1cdf4ed804ccb660ccff29913587
description: Represents the relationship between an email and contacts, leads, and users. This object is available in API version 37.0 and later.
---
# EmailMessageRelation

Represents the relationship between an email and contacts, leads, and users. This object is available in API version 37.0 and later.

## Special Access Rules

EmailMessageRelation is only available for organizations that use Email-to-Case or Enhanced Email, which is automatically enabled for most customers.

## Supported Calls

create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), update(), upsert()

## Fields

| Field Name | Details |
| --- | --- |
| EmailMessageId | 
Type

reference

Properties

Create, Filter, Group, Sort

Description

The ID of the EmailMessage record.

This is a relationship field.

Relationship Name

EmailMessage

Relationship Type

Lookup

Refers To

EmailMessage



 |
| DeliveryResponse | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The delivery response from the email recipient. Possible values are:

- SoftBounce
- HardBounce
- OutOfOffice

Available in API version 67.0 and later.



 |
| RelationAddress | 

Type

string

Properties

Create, Filter, Group, Nillable, Sort

Description

The email address of the sender or recipient.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

If a record relates an email to an existing contact, lead, or user record in Salesforce, the value of RelationAddress is the current value of the email address. If the value is not set, it is auto-populated from RelationId.















 |
| RelationId | 

Type

reference

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The RecordId of the sender or recipient.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

If a record relates an email to an email address that’s not associated with an existing contact, lead, or user record in Salesforce, the value of RelationId is null.

This is a polymorphic relationship field.

Relationship Name

Relation

Relationship Type

Lookup

Refers To

Contact, Lead, User



 |
| RelationObjectType | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The API name of the object type of the RecordId in the RelationId field. It can be a contact, lead, or user.



 |
| RelationType | 

Type

picklist

Properties

Create, Filter, Group, Restricted picklist, Sort

Description

The type of relationship the contact, lead, or user has with the email message. Possible values include:

- ToAddress
- CcAddress
- BccAddress
- FromAddress
- OtherAddress

For an Experience Cloud site user who is not the sender of the email, no BccAddress relations are returned.



 |

## Usage

EmailMessageRelation allows an email to be related to contacts, leads, and users.