app.mailMsg does not work

I have a form that I am using the app.mailMsq funciont in javascript to send data from my form in an email.

The script seems to look ok, but when hitting actually hitting the button, nothing happens. Any thoughts?


form1.#subform[0].Button2::click - (JavaScript, client)

var to = this.getField("email");
var pmNumber = this.getField("pm_number");
var subject = "";
var inspection_date = this.getField("inspection_date");
var inspection_time = this.getField("inspection_time");
var inspection_type = this.getField("inspection_type");
var results = this.getField("results");
var notes = this.getField("notes");
var inspector_name = this.getField("inspector_name");
var emailBody = "";

subject += "Town of Southampton Building Inspection Results for permit # " + pmNumber.value ;
emailBody += "Below are the results from your Inspection by the Town of Southampton"
emailBody += "INSPECTION DATE: " + inspection_date.value + "\r\n";
emailBody += "INSPECTION TIME: " + inspection_time.value + "\r\n";
emailBody += "INSPECTION TYPE: " + inspection_type.value + "\r\n" ;
emailBody += "RESULTS: " + results.value + "\r\n";
emailBody += "NOTES: " + notes.value + "\r\n";
emailBody += "INSPECTOR NAME: " + inspector_name.value + "\r\n" ;

app.mailMsg({
bUI: true,
cTo: to.value,
cSubject: subject,
cMsg: emailBody
} );


Peter Mulvey


Voted Best Answer

From the first line it seems this is a LiveCycle form. If that's the case, it has a different syntax than that of Acrobat forms.


By Gilad D (try67)   


Please specify a reason: