Deleted Mailbox messages on iPhone are not deleting on iMac Mailbox
I mainly use my iPhone to check my email from mailbox (connected to Gmail). When I open mail on my iMac all the emails I have deleted on my iPhone are sitting in my inbox.
If I delete messages from my iMac it updates on my iPhone.
My iMac was short on memory and upgraded (not sure if that has anything to do with it).
Any help would be greatly appreciated and probably needed to be explained kindergarten style.
iMac, macOS 10.13