Send email to user based on field in form - InfoPath Dev
in

InfoPath Dev

Send email to user based on field in form

Last post 07-31-2012 10:53 PM by tuberajesh. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-01-2009 01:04 PM

    Send email to user based on field in form

    Hello,

    In InfoPath 2007, I am trying to create a form that will send an email message to a specific user after the form has been submitted using Infopath web services in Sharepoint (MOSS 2007).  I have a drop down list box in the form, that is populated with "Full Names" from a Contacts list in Sharepoint.  Before the user submits the form, they choose a name from this field.  After submitting the form, the corresponding person, will then be emailed a message (not a copy of the file).  I have tried to do this with Sharepoint Designer's Workflow, but can't figure out how to do it.  Is there anyway within Infopath or Sharepoint workflow to accomplish this without having to use code?  What is the best way to specifically do this?

    Thanks for any help,
    Aaron

  • 07-01-2009 02:06 PM In reply to

    Re: Send email to user based on field in form

    Several ways to do this.  If you want to use a Contacts list like that, then you should have both the full names and email addresses in the Contacts list, right?  If you do, then when you make the data connection to that list, be sure to pull down full name and email address.  Then, when you configure the pulldown to pull from that external data source, put the Email Address as the VALUE and put the Full Name as the DISPLAY NAME.  That way, users will see Full Names to choose from, but the value of that field will be an email address.  You can then reference this field in your SPD workflow for your To and/or CC fields.  Be sure to choose "Current Item - FieldWithDropDown."

    I would also recommend that if you go this route, be sure to do synchronization with Outlook 2007 (if you have that).  On the Contacts List, click Actions > Connect to Outlook (click through the prompts).  This will put the contacts list in Outlook as a separate contact list.  You would then want to populate that contacts list straight from the Global Address Book so that there is never a typo or discrepancy.  As you add them from the GAL to your contact list in Outlook (the SharePoint one), it will automatically synchronize with SharePoint and put all that data in.  That way, you know that the data pulled into your form is always exactly correct as long as Active Directory is correct.  Be aware that if contacts change in AD, they will not automatically pass through Outlook to the list.  You have to grab the udpate from the GAL and pass it forward to SharePoint, but that's the same even if you don't use this Outlook method.  Use my write-up on my blog that explains this concept as part of a larger concept: User Roles in Browser-Enabled InfoPath Forms

  • 07-01-2009 02:16 PM In reply to

    Re: Send email to user based on field in form

    Works great.  Thanks for the help, warrtalon.

  • 07-31-2012 12:45 AM In reply to

    Re: Send email to user based on field in form

     Hi, I created an email form from Infopath without connecting to a share point, Whenever user submit the form, I get an email to my inbox and immediately there will be an acknowledgement sent to the user by using script from my outlook, However, I need to send two different email & one is for the user who is submitting the form and other one should be picked it up from email form text box field. Here is the code that I am using to send an auto acknowledgement email,,

     Can anyone help me with the code to pull email ID from infopath email form submitted by users.???

     

    Sub SendNew(Item As Outlook.MailItem)

     
    Dim objMsg As MailItem


    Set objMsg = Application.CreateItemFromTemplate("XXXPath\Automated Email  .oft")
     
    objMsg.Recipients.Add Item.SenderEmailAddress
     
    objMsg.Send
     

    End Sub
     

  • 07-31-2012 10:53 PM In reply to

    Re: Send email to user based on field in form

     CAN ANY ONE HELP ME WITH THE BELOW ISSUE,, PLZ

     Hi, I created an email form from Infopath without connecting to a share point, Whenever user submit the form, I get an email to my inbox and immediately there will be an acknowledgement sent to the user by using script from my outlook, However, I need to send two different email & one is for the user who is submitting the form and other one should be picked it up from email form text box field. Here is the code that I am using to send an auto acknowledgement email,,

     Can anyone help me with the code to pull email ID from infopath email form submitted by users.???

     

    Sub SendNew(Item As Outlook.MailItem)

     
    Dim objMsg As MailItem


    Set objMsg = Application.CreateItemFromTemplate("XXXPath\Automated Email  .oft")
     
    objMsg.Recipients.Add Item.SenderEmailAddress
     
    objMsg.Send
     

    End Sub
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.