File size: 839 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Query Email Accounts

`<QueryEmailAccounts />` is a React component used in managing network requests for all Email Accounts across providers for a site.

## Usage

Render the component, passing in the properties below. It does not accept any children, nor does it render any elements to the page.

```jsx
import QueryEmailAccounts from 'calypso/components/data/query-email-accounts';

export default function listEmailAccounts( { emailAccounts } ) {
	return (
		<div>
			<QueryEmailAccounts siteId={ siteId } />
			{ emailAccounts.map( ( emailAccount ) => (
				<li>{ `${ emailAccount.mailbox }@${ emailAccount.domain }` }</li>
			) ) }
		</div>
	);
}
```

## Props

### `siteId`

<table>
	<tr><th>Type</th><td>Number</td></tr>
	<tr><th>Required</th><td>Yes</td></tr>
</table>

The ID of the site to fetch the email accounts users for.