useing EmailAdapter - InfoPath Dev
in

InfoPath Dev

useing EmailAdapter

Last post 02-13-2007 05:18 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-13-2007 04:41 AM

    useing EmailAdapter

    I saw in many posts this example:

    EmailAdapter oEmail = (EmailAdapter)thisXDocument.DataAdapters["Email"];


    I don't know what "Email" is.

    If i don't declare it in any other place i receive an error:
    <<
    System.Runtime.InteropServices.COMException
    An item with the following index does not exist in the collection: EmailSubmit
    at Microsoft.Office.Interop.InfoPath.SemiTrust.DataAdapters.get_Item(Object varIndex)
    at Microsoft.Office.Interop.InfoPath.SemiTrust.DataAdaptersCollectionWrapper.get_Item(Object varIndex)
    at test.test.OnSubmitRequest(DocReturnEvent e)
    at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnSubmitRequest(DocReturnEvent pEvent)
    >>

    I didn't receive this error when i used
    tools
    data connections
    add
    "Email"

    The problem is when i made the "Email" data connection, i had to give an email adress, and i dont't know what will happen with that adress.

    Can you explain me how the email adapter works, and how do i use "Email"

    Basescu.
  • 02-13-2007 05:18 PM In reply to

    Hi Basescu,
    "Email" is just the name of the adapter. There is an e-mail envelope which you can set values for programmatically by dereferencing oEmail. Have you read the InfoPath 2003 SDK? If not, it has lots of examples. There's a link on our Resources page. We also have code in the book: "Developing Solutions with InfoPath" which shows you how to set the e-mail envelope values.
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.