The IMAP protocol has features that allow uploading of mail messages and there are implementations that can be configured to also "send" messages like an MTA, which combine sending a copy and storing a copy in the "Sent" folder in one upload operation.