If you have an iPhone you may have noticed that sometimes it won't allow you to move your deleted mail to your trash. This issue is most likely caused because of use of IMAP, and having all sent trash being set to local.
To remedy this problem follow these outlined steps:
Note: if you are using iOS7 or earlier, take a look at our how-to for remedying the issue for those versions.
Access the mail settings on your iPhone via Settings, and then Mail, Contacts, Calendars
Click the account name for the mail account you want to edit
Select the Advanced settings option at the bottom of the screen
Go through and click each (Drafts Mailbox, Sent Mailbox, Deleted Mailbox, Archive Mailbox and set each to the 'Remote' option
And that's that... now your IMAP folders on your iPhone will be set to be handled on the server.