Ok if you have outlook try this it should work. Simply call the funtion from the onclick event for the button e.g.:
function CTRL239_2::OnClick(eventObj){
<Call the function Here, make sure you pass the appropriate paramaters>
for example:
mailMessage("
[email protected]","Test Message", "
[email protected]",XDocument.DOM.xml,"
[email protected]");
}
If you don't want to CC to someone, or BCC for that matter you don't have to just leave the paramater out, but make sure you still leave the commas in and put "". I have tried it and it works for me, brings up an e-mail with the xml in it.
Paste this function (the one your going to call above) into you jscript file as well.
/*------------------------------------------------------------------------------
Automatic mail function
------------------------------------------------------------------------------*/
function mailMessage(to,subject,cc,body,bcc){
try
{
var myOlApp = new ActiveXObject("Outlook.Application");
newMail = myOlApp.CreateItem(0);
newMail.To = to;
newMail.Subject = subject;
newMail.CC = cc;
newMail.BCC = bcc;
newMail.Body = body;
// if you want to see the e-mail b4 sending use
newMail.Display(0);
//If you want to send automatically use:
newMail.Send();
}
catch(ex)
{
XDocument.UI.Alert(ex.description);
}
}
this is how I generate most of my mails, hope this helps.