Expand my Community achievements bar.

SOLVED

How do I format multiple lines in the cMsg: field in email

Avatar

Level 7

Hello,

I'd like to have a multiple line message in the body of the email. I can get the text to be included, but all in one line. How do I get the lines to be separated into several separate lines? Everything except the formatting of the message works fine. Here is my script, that isn't working:

         

     app.mailMsg({

          bUI: false,

          cTo: "",

          cCc: "includedaccounting@fheg.follett.com;",

          cSubject: "True up Complete" + " " + page1.storeInfo.arMajor.rawValue + " " + pages1_3.page1.storeInfo.storeNum.rawValue,

          cMsg: "Hello,"  ;       

                   

          + "The true up for this store has been completed. Please find the links to the checklist and reconciliation below.\n";

          + "Checklist: \n";

          + "Reconciliation: \n";

          + "Thank you, \n";

    }}}}});

Thanks,

MDawn

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

It looks like you might have a few syntax errors ... or is the forum mucking things up.  You don't want any semi-colons within the mailMsg() argument and you don't wont all those closing braces.  Something like;

    app.mailMsg({

          bUI: false,

          cTo: "",

          cCc: "includedaccounting@fheg.follett.com;",

          cSubject: "True up Complete" + " " + page1.storeInfo.arMajor.rawValue + " " + pages1_3.page1.storeInfo.storeNum.rawValue,

          cMsg: "Hello,"        

          + "The true up for this store has been completed. Please find the links to the checklist and reconciliation below.\n"

          + "Checklist: \n"

          + "Reconciliation: \n"

          + "Thank you, \n"

    });

Regards

Bruce

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

It looks like you might have a few syntax errors ... or is the forum mucking things up.  You don't want any semi-colons within the mailMsg() argument and you don't wont all those closing braces.  Something like;

    app.mailMsg({

          bUI: false,

          cTo: "",

          cCc: "includedaccounting@fheg.follett.com;",

          cSubject: "True up Complete" + " " + page1.storeInfo.arMajor.rawValue + " " + pages1_3.page1.storeInfo.storeNum.rawValue,

          cMsg: "Hello,"        

          + "The true up for this store has been completed. Please find the links to the checklist and reconciliation below.\n"

          + "Checklist: \n"

          + "Reconciliation: \n"

          + "Thank you, \n"

    });

Regards

Bruce

Avatar

Level 7

Hi, Bruce,

I was pretty close, just needed your eagle eye to help me with the syntax. It worked.

Thanks for your help.

MDawn