How to send an email using mailDoc()?
I have a form that I need to send via email when a button is clicked. So, using the "Mouse Up" trigger I entered a "Run a JavaScript" action. Here's the code I entered into the "Create and Edit JavaScripts" box for the action:
//always send the email to HR
var cToEm = "me@mydomain.org"
// Get the employee's email address
var cEmpEm = this.getField("EmployeeEmail").value;
// Get the manager's email address
var cMgrEm = this.getField("ManagerEmail").value;
// Combine the two for the cc
var cCEm = cEmpEm + ";" + cMgrEm;
// Set the subject and body text for the email message
var cSubLine = "Catastrophe Timesheet for " + this.getField("NAME").value;
var cBody = "Please find attached document for " + this.getField("NAME").value.
// Send the entire PDF as a file attachment on an email
this.mailDoc({
bUI: true,
cTo: cToEm ,
cCc: cCEm ,
cSubject: cSubLine,
cMsg: cBody
});
But the emails aren't being sent. What am I missing?
