Sending different e-mails with InfoPath 2003
June 1, 2007
You can send e-mails to people with the InfoPath form as an attachment by adding another data connection and specifying the recipients etc in the dialog. However, sending an e-mail this way forces the user to approve of this by clicking OK after choosing to submit. After that, another message window pops up (hopefully) informing the user that the form was sent.
However, I needed to send mail messages with different formatting and content to different recipients. This was because I didn’t want the person filling out the form receiving an exact copy of the message going to the approver in the workflow. I mean, the requester doesn’t need to read “This is a request made by [requester name]. Please approve asap…”. All that the requester wants is a confirmation that the form has been sent.
When adding another message in InfoPath, you have to approve of yet another message being sent (to yourself oftenly) by clicking OK in yet another dialog after submitting. Four clicks just to send the form is too much. So I delegated all the mail sending activities to a web service. Now all you see when submitting is a message confirming that the form was sent. Smooth…
I don’t think I’m at the liberty to put any source code here, but if you want to know more just contact me and we’ll see what we can do.