You wrote - Either iCloud and gmail works perfectly. Problem with simple mail account.
You have either deleted the iCloud account or have not yet set it up , from the location system preferences > internet account.
The simple gmail account address is kept same as your apple mail address .
See some articles Sign in with your Apple ID - Apple Support
macOS Sierra: Set up iCloud on your Mac
In case if I cloud account and gmail account is deleted see this method to set it up .
If you delete both web mail account ( say gmail account ) and iCloud mail account from system preferences > internet accounts .
( a ) when you select web mail account and click on minus sign , it will prompt are you sure you want to delete the account ( 1 ) cancel ( 2 ) ok and you click on ok the account will be deleted .
( b ) And if you delete iCloud account ( 1 ) do you want to keep a copy of your iCloud data on this Mac before signing out ?
Cancel , keep a copy , so click on keep a copy .
Do you want to keep a copy of your safari passwords on this Mac ?
( 1) delete from Mac .
( 2 ) cancel
( 3 ) keep on this Mac .
So , click on keep on this Mac .
It will prompt to enter Apple ID password to turn off find my Mac , so enter and click on continue .
Do you want to keep a copy of your iCloud data on this Mac before signing out ?
If you don’t keep a copy , your data will be removed from this Mac but will still be available on other devices using iCloud .
( a ) the box for iCloud Drive is checked ( b ) the box for contacts is checked .
Now , open apple mail application , choose a mail account provider and select google click on continue , enter your web mail address and password and click on next , check the boxes of mail , contacts , calendars , notes and click on done .
The gmail account has been set and mails will start downloading .
Open system preferences and click on iCloud , a pop up window will appear iCloud lets you access your music , photos , contacts , calendars and more on your devices , automatically .
Sign in with your Apple ID and click on next and enter your Apple ID password .
( a ) check the box of use iCloud for your documents and data
( b ) use find my Mac
( 1 ) back ( 2 ) next so click on next .
A pop up window will appear allow find my Mac to use the location of this Mac
( 1 ) not now ( 2 ) allow so click on allow .
You have to enter your Apple ID password to set up iCloud Keychain and click on ok .
A pop up window will appear to set up iCloud Keychain on this Mac , request approval from one of your devices using iCloud Keychain .
( 1 ) use code
( 2 ) cancel
( 3 ) request approval
So , click on use code .
Enter your iCloud security code and enter the iCloud verification code sent to your trusted mobile and click on ok .
After some time , the box for keychain in iCloud will get checked , also check the box of Siri and make sure back to my Mac is always unchecked .
So , both web mail account and iCloud account are configured .