Submit Form to email body as plain text? - InfoPath Dev
in

InfoPath Dev

Submit Form to email body as plain text?

Last post 01-17-2008 09:15 AM by ScottD. 16 replies.
Page 2 of 2 (17 items) < Previous 1 2
Sort Posts: Previous Next
  • 12-28-2007 06:36 AM In reply to

    Re: Submit Form to email body as plain text?

    Matt

    Thanks, that's very helpful - I can't believe it was that simple.
    Anyway, this may not be very sophisticated but it works fine:

    function SendEmailBtn::OnClick(oEvent)
    {
     createEmail();
    }
    function createEmail()
    {
     var xmlmanager = XDocument.DOM.selectNodes("/ar:absenceRequest/ar:manager/ar:name");
     var xmlname;
     var xmlTitle = XDocument.DOM.selectSingleNode("/ar:absenceRequest/ar:contact/ar:name/ar:singleName");
     var copy1 = XDocument.DOM.selectSingleNode("/ar:absenceRequest/ar:contact/ar:name/my:Contact1");
     var copy2 = XDocument.DOM.selectSingleNode("/ar:absenceRequest/ar:contact/ar:name/my:Contact2");
     var rgRecipients = new Array();
     while (xmlname = xmlmanager.nextNode())
      rgRecipients.push(getNodeValue(xmlname.selectSingleNode("ar:singleName")));

     try
      {
      var oEnvelope = XDocument.View.Window.MailEnvelope;
     
      oEnvelope.To = rgRecipients.join("; ");
      oEnvelope.Subject = getNodeValue(xmlTitle) + " - " + "PTO Request";
      oEnvelope.CC = getNodeValue(copy1) + ";" + getNodeValue(copy2);
      oEnvelope.Visible = true;
      }
     catch (ex)
      {
      XDocument.UI.Alert(ex.description);
      }

    Cheers - Bob

    Cheers
    Bob
  • 01-17-2008 09:15 AM In reply to

    Re: Submit Form to email body as plain text?

    Anyway to change the Font or Bold in the plain text in the body?

    this is infopath 2003

Page 2 of 2 (17 items) < Previous 1 2
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.