Send Form As Attachment - InfoPath Dev
in

InfoPath Dev

Send Form As Attachment

Last post 07-18-2006 06:28 AM by Kalyan Gaddam. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-18-2006 05:37 AM

    Send Form As Attachment

    I developed a IS procurement form. I wrote code for the submit button so that it opens the "Send Form As Attachment" window. (The reason I want to send the email this way is because I want the form to be in HTML format in the body of the email.) However, I would like to be more automated so when the user clicks Submit, it automatically sends. If that's not possible, can there be an alert asking the user to confirm the submit and then that will send the email and close the form?


    var mail = XDocument.View.Window.MailEnvelope;
    var region = XDocument.DOM.selectSingleNode("/my:myFields/my:userInfo/my:region").text;
    var firstName = XDocument.DOM.selectSingleNode("/my:myFields/my:userInfo/my:firstName").text;
    var lastName = XDocument.DOM.selectSingleNode("/my:myFields/my:userInfo/my:lastName").text;
    var department = XDocument.DOM.selectSingleNode("/my:myFields/my:userInfo/my:department").text;
    if (region =="Corporate")
    {
    mail.To = "[email protected]";
    mail.CC = "[email protected]";

    var subject = "Request from " + firstName + " " + lastName + " of " + department + " department in " + region + " region.";
    mail.Subject =subject;

    }
  • 07-18-2006 06:28 AM In reply to

    Re: Send Form As Attachment

    Hello
    Welcome to Infopathdev Forums

    Email cannot be send automatically since this is a security feature to prevent spamming from user machine without user's knowledge.
    Please read the links below and also the links that come up in side.
    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1755

    I hope they help you to solve your issue.
    Kalyan G Reddy
    Infopath MVP 2007 and 2008
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.