I guess it’d be fairly straightforward. You’d probably have to remove some actions, rewrite a few functions and use either phpmailer (included with WP) or swiftmailer (which I prefer) in those functions and then add these functions to the actions you removed earlier on.