database email list

M

MCC

Hello,
I created a form with infopath sp1 and a sql database.
I would like to send an email to a list. data are in a table of sql database.
I used this code : function createEmail7()
{
var xmlContributors =
XDocument.DOM.selectNodes("dfs:dataFields/d:CTAProjetUsager");
var xmlContributor;
var xmlTitle ="bonjour";
var rgRecipients = new Array();

while (xmlContributor = xmlContributors.nextNode())
rgRecipients.push(xmlContributor.selectSingleNode("StrAdresseMessagerie").text);

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

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


}

but it isn't working. even if i put informations on the table. I have no
information in To.
Thanks in advance for your help.

MCC
 

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