Emails deleted from server

Hello,

I want to use one of our office365 accounts to send emails. Unfortunately when setting it up, all inbox emails were removed from the server. How can I sync them back?

what do you mean by remove? I think erpnext setting app email is just for reading and sending but no removing.

By Remove, I indeed mean that all mails from my inbox were moved from the mail server to erpnext. It seems I forgot to thick the box to use imap. After doing this new mails were kept on the mail server. Fortunately office365 has an option to restore deleted emails even if they are not in the deleted folder.