Method 1
Click “Take All Accounts Online” from the main Apple Mail > Mailbox menu.

Method 2
Right-click on the INBOX icon and select to the option to take all accounts online.

Method 3
Click the white icon to right of the Inbox icon.
When prompted click Take All Accounts Online.

If you only want to take individuals mailboxes online, right-click on the mailbox and select the option to take that mailbox online.