In order to reconfigure an iPhone to keep the sent, drafts or deleted messages on the mail server, you should first login to the e-mail account through the built-in iPhone mail client and then browse the following folders,
Next step is to open Settings -> Mail, Contacts, Calendars -> Select your email account -> Select the displayed IMAP account -> Advanced Settings (at the bottom) - > Mailbox Behavior.
You will find the following 3 options listed at the top,
These options lead to a page that allows you to configure how your phone stores a copy of drafts, sent or deleted messages.
Each page will display a directory tree available on your mail server, and you need to choose one of the folders in this directory tree (under the "On the server" section) in order to force the mail client to store the messages there.