How can I automate sending infopath form as e-mail HTML

T

toolmaker

I want to automate sending an InfofPath form as an HTML e-mail message, and
NOT as an attachment. How can I do that?
 
T

toolmaker

I found sample code to perform this task in the sample template "Issue
Tracking: Detailed". Here is the code:


/*------------------------------------------------------------------------------
This function handler is generated and managed automatically.
Do not rename the function or alter its parameter list
------------------------------------------------------------------------------*/
function SendEmailBtn::OnClick(oEvent)
{
createEmail();
}



function createEmail()
{
var xmlContributors =
XDocument.DOM.selectNodes("/iss:issue/iss:contributors/iss:contributor");
var xmlContributor;
var xmlTitle = XDocument.DOM.selectSingleNode("/iss:issue/iss:title");
var rgRecipients = new Array();

while (xmlContributor = xmlContributors.nextNode()
rgRecipients.push(getNodeValue(xmlContributor.selectSingleNode("iss:emailAddressPrimary")));

try
{
var oEnvelope = XDocument.View.Window.MailEnvelope;

oEnvelope.To = rgRecipients.join("; ");
oEnvelope.Subject = getNodeValue(xmlTitle);
oEnvelope.Visible = true;
}
catch (ex)
{
XDocument.UI.Alert(ex.description);
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top