I was accessing a customers mailbox for some troubleshooting and I forgot to uncheck the "delete messeges from server" option in outlook so all his emails are gone from the server.
Is there any way to sync them back to the server?
No, if they are deleted from the server they are gone. It might be possible that the provider keeps a backup and is willing to restore the e-mail on the server.
You might want to check if they really are gone, can't you see the mail on a different client?