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.

4 Responses to “Sending different e-mails with InfoPath 2003”

  1. Anand Says:

    I want to know. How to do it ? Will you please help me ?

    Thanks and Regards,

    Anand Bhopale

  2. Chew Says:

    Hi,
    I am interested to know as well. Please send me the source code. Thank you very much.

    Chew

  3. microserf Says:

    Hello Chew!

    I’m sorry, but I no longer have access to that code, so I can’t do that.

    However, the procedure was quite simple… just put up a web service that skims through the infopath xml to get the e-mail addresses. And then you use System.Net.Mail (System.Web.Mail for .Net 1.1) to send the messages. Easy and flexible.

    Good luck!
    // Peter

  4. gaurish salunke Says:

    hi.i need to develop a email sender where in i need to send mails to candidates to appear for interview
    i need to send mails to diff ppl at once ,but the contents in each mail must be diff such as interview dat and time pls help me dude.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: