Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Email script not working

Avatar

Level 3

A user has updated to Reader XI and the following script does not work now. How can I update this to be compatible with this latest version?

 

({cURL:"mailto:Person@Place.com?subject=Incident Acknowledgment &body=Please find attached confirmation of the current Incident.",cSubmitAs:"PDF",cCharset:"utf-8"});

Thanks!

-pc

7 Replies

Avatar

Level 10

Hi,

use:

event.target.mailDoc({

          bUI: false,

          cTo: 'Person@place.com',

          cCc: '',

          cBcc: '',

          cSubject: 'Incident Acknowledgment',

          cMsg: 'Please find attached confirmation of the current Incident.'

});

Avatar

Level 3

It seems to work for one email destination...to add another email address in the "to" line would it look like

'person@place.com', 'person2@place.com',

that format doesn't seem to work...?

Avatar

Level 10

You have to use a semicolon to separate several addresses.

event.target.mailDoc({

          bUI: false,

          cTo: 'PersonA@company.org; PersonB@company.org',

          cCc: '',

          cBcc: '',

          cSubject: 'Incident Acknowledgment',

          cMsg: 'Please find attached confirmation of the current Incident.'

});

Avatar

Former Community Member

i am trying to figure out the same thing and was  wondering where do i place ths in my code?

Avatar

Level 10

The click event of a button is one opportunity.

Avatar

Level 5

You may already know this, but if not.

CTRL+SHIFT+F5 will bring up the script editor window pane. Then choose the type of event you want to script in. Near the top left of the screen is a "SHOW:" label with a drop down list of choices. "CLICK" is one choice and usually the best for your email button needs.