Email infopath form - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Email infopath form

Last post 05-15-2005 10:14 AM by Patrick Halstead. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 11-24-2004 06:15 AM

    Email infopath form

    I'm attempting to submit and email an InfoPath form to someone else (myself actually for testing). First off, the

    oEMail.AttachmentFileName = "IPHardwareSoftwareRequest.xsn"

    which is the name of my InfoPath form, not sure of the extension, (although I think I'm right)

    It allows me to view the attachment before I email it, and I see the XML code...

    It appears to be a legitimate InfoPath form that gets attached, but when I attempt to open it from Outlook by double clicking it, I get an error....Infopath cannot create a new blank form. Infopath cannot open the form. To fix this problemn, contact your system administrator (me).


    Form template: C:\Documents and Settings\dwheeler\Local Settings\Temporary Internet Files\OLK5\IPHardwareSoftwareRequest.xsn
    The file cannot be accessed.
  • 11-24-2004 08:34 AM In reply to

    You can only use the form if you have the form template. So when you mail the form to someone from within InfoPath, you are only mailing the .xml form (not the form template). The other person has to already have the form template installed... AND they need to have it installed in the SAME location that you did.

    Specifying the attachment name as *.xsn isn't right. It is the XML file you are emailing. It should be *.xml.

    If computer 1, which sends the email, has the form installed at C:\Program Files\My Forms\IPHardwareSoftwareRequest.xsn, then computer 2, which receives the email, must also have the form installed at C:\Program Files\My Forms\IPHardwareSoftwareRequest.xsn.

    Does this make sense?

    Greg Collins [InfoPath MVP]
  • 11-24-2004 10:38 AM In reply to

    Point taken... Thanks
  • 12-03-2004 06:49 AM In reply to

    When I email the "submit.xml" to myself, I can select the XML file and view it, as long as InfoPath is currently running in the background.
    If I close InfoPath and attempt to select the XML file,
    it attempts to find an additional file in "C:\Documents and Settings\dwheeler\Local Settings\Application Data\Microsoft\InfoPath\Designer\"blahblahblah"\manifest.xsf".
    So, I tried to create the directory called "blahblahblah" and inserted the file "manifest.xsf", to see if I could remedy the error (just for testing purposes), and I get an error in reference to my schema.xsd.
    I know that the contents within the .....\InfoPath\Designer are just temporary directories and files to be used when InfoPath is running.

    Question 1:
    If I emailed the "Submit.xml" to someone who has InfoPath on their PC, you mentioned that they would need to have the template placed on their PC, I take it that this would be the manifest.xsf?

    Question 2:
    "C:\Documents and Settings\dwheeler\Local Settings\Application Data\Microsoft\InfoPath\Designer\"blahblahblah"\manifest.xsf"

    How can I change this to have it reflect something like "c:\program files\infopath templates\manifest.xsf". This would go over a lot better that having the "dwheeler" in the path of someone elses' PC.

  • 12-03-2004 02:54 PM In reply to

    From what I understand about emailing forms... the location of the form template remains intact... in your case the form template was being looked for in:

    C:\Documents and Settings\dwheeler\Local Settings\Application Data\Microsoft\InfoPath\Designer\"blahblahblah"\manifest.xsf

    Just dropping the manifest in there doesn't do any good because the whole set of form tempalte files needs to coexist with the manifest.xsf file in order for it to be any good.

    Q1: You're best bet is to create a .msi install file for the form and everyone install it at the same physical location.

    Q2: Same as Q1 -- Run your form from that location... that should be where it is looked for on the other computer.

    Having said all that... let me say that I haven't taken time to test this and I've only worked a little with emailing forms. So I could be way off on everything. This is my understanding, however, of how this works.

    Greg Collins [InfoPath MVP]
  • 05-05-2005 10:32 PM In reply to

    for sending an email programmatically, is Office Outlook 2003 required?
    or any outlook version would suffice?
  • 05-06-2005 01:10 AM In reply to

    For sending email programatically any outlook should suffice, Even outlook express should work.
    I think by programatically you meant through regular .NET code.

    Please reply to this message about how to send email programatically.

    InfoPathDev India
  • 05-06-2005 08:27 PM In reply to

    hi agni,

    i got this piece of code to send email programmatically not using .NET code but I'm guessing it'll need the form to be fully trusted though - i need this to be verified.

    available at:

    function btnSend::OnClick(eventObj)
    // Create a new message and fill all its fields
    var iMsg = new ActiveXObject("CDO.Message");
    iMsg.To = "";
    iMsg.From = XDocument.DOM.selectSingleNode("//my:email").text;
    iMsg.Subject = XDocument.DOM.selectSingleNode("//my:subject").text;
    iMsg.TextBody = XDocument.DOM.selectSingleNode("//my:content").text;

    // Set SMTP server

    tpserver") = "";
    // Use the SMTP over the netowrk for sending method

    ndusing") = 2;
    // Make persistent

    // Send the message

    When a form needs to create an ActiveX object, does it have to be fully trusted?

    And yes, I'm interested to know your coding approach using .NET code, please :)
  • 05-09-2005 06:13 PM In reply to

    Yes, this will require Full Trust because of the ActiveX object.

    Patrick Halstead [InfoPath MVP]
    Patrick Halstead
    Project Manager at Qdabra
  • 05-14-2005 09:00 AM In reply to

    I'm trying to include "fieldname = fieldvalues" of all the form controls as part of the email body message.
    But why is it that everytime a user enters a newline character in the "Rich Text (XHTML)", the above email code fails with the following error message:

    "The message could not be sent to the SMTP server. The transport error code was 0x800ccc6a. The server response was 451 See"

    WHen I examine the XML file, the XHTML data looks like:
    <div xmlns="">mag +(*3w _ p</div>
    <div xmlns="">Z</div>

    So I tried using regular expression to convert it to a plain HTML like:
    description.replace(/\s*xmlns="http:\/\/\/1999\/xhtml"/g, "");

    But it still fails.

    ANyone know how to solve this?
  • 05-14-2005 09:33 AM In reply to

    btw, have tried as well substituting LF characters as suggested in the website
    still won't work :(
  • 05-15-2005 10:14 AM In reply to

    I have no idea.

    Patrick Halstead [InfoPath MVP]
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (12 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.