Please try to follow the Apple Mail and Apple Mail Settings guides for assistance
Are all accounts using imap or are one or more pop3?Pop3 doesn’t sync between multiple devices.
I did check all the information and it was all correct, so I deleted all my email accounts on ipad and iphone and installed the accounts again and all syncing fine now! Thanks
Good to hear recreating the accounts worked.