I have a javascript that takes information from form fields and inserts them into the body of an email message. Everything works, except one thing. One of the text fields in the form allows (RTF) "rich text". I cannot seem to find how to insert the text into the email with the RFT formatting intact.
Wondering if this gets into creating an HTML email from the script. Any ideas would be appreciated.
Here is the relevant section of the script:
////////////////
// Email()
//
// Function to email the form and format the subject line
// the subject line is used by mail filter to route to the correct PM
//
function Email()
{
var atype = this.getField("request")
var metro = this.getField("metro")
var advert = this.getField("advertiser")
var size = this.getField("size")
var color = this.getField("color")
var notes = this.getField("notes")
var msgBody = atype.value + "\n\n" + "Advertiser: " + advert.value + "\n\n" + "Market: " + metro.value + "\n\n" + "Size: " + size.value + "\n\n" + "Color: " + color.value + "\n\n" + "Notes: " + notes.value + "\n\n" + "Ad Copy: " + this.getField("adcopy").value
this.mailDoc({
bUI: false,
cTo: "joe [at] sample [dot] com",
// cCC: "bill [at] sample [dot] com",
cSubject: metro.value + advert.value,
cMsg: msgBody,
});