the webmail is saying connection to imap server failed please help
In your DNS settings page here, your IMAP server is probably set to . It should be to bypass Cloudflare. Cloudflare doesn’t proxy IMAP.
I also hope your IMAP server doesn’t have the same hostname as your website. It should be at least a subdomain.