Hi Jack3903,
Thanks for posting your question. As I understand it, you're receiving an IMAP server error and you're unable to connect to either Wi-Fi or cellular data.
If so, the IMAP server error would be explained by the connectivity issue. It sounds like you're unable to use other network-connected apps like Safari and Messages as well, correct?
Are you using iOS 13.3 on your device? If not, updating might be a good start. Be sure to check for carrier updates after:
How to back up your iPhone, iPad, and iPod touch
Update your iPhone, iPad, or iPod touch
Update your carrier settings on your iPhone or iPad
If that doesn't help, a good next step would be to reset your network settings by tapping Settings > General > Reset > Reset Network Settings. This clears out any saved Wi-Fi networks/passwords, and APN/VPN configurations. Once you've done the reset, test to see if Wi-Fi and cellular data work as expected.
Have a great day.