I've got an infopath form for which I am trying to convert the submit from rules to code, to add some functionality. All existing functionality needs to be kept. Currently it's in rules like:
if X submit through connection A if Y submit through connection B etc.
Connection A sends an email, connetion B sends a different email, connection C uploads to the sharepoint site.
I know how to submit through code, and have it submitting to the sharepoint site (the default connection), but how do I submit to a specific connection?
My current code is based on this MSDN which posts the XML to the site. I'm hoping to find a way to use the existing connections so I don't have to hand code all the email sends (there are several).