Pandora - Send a Message

From SmartWiki
Jump to: navigation, search

Function Overview

The following function is used to trigger a message.

send_msg(flag,callbackfunc,msgtype,format,fromadd,touserid,cc,subject,body)
Parameter Description
Flag True or false, send synchronously or asynchronously.
Callbackfunc Function to be used after the asynchronous function call.
msgtype 0=Quick message, 20 = email.
format 0 = text, 1= HTML.
fromadd From Email address.
touserid To Email address.
cc CC Email address.
subject Message subject.
body Message body.
Returns ssRecordSet object

Notes

Multiple recipients are separated by commas.

Example

Browser Script added as a Contact Custom Field – Browser Script.


</SCRIPT>

<SCRIPT type="text/javascript" language="JavaScript" src="/Ajax/uta/uta.js">

</SCRIPT>

<script language= JavaScript >

function apisend() {

ss_developer_key="developer key";

var frm=document.frmuser;

var subject='Registered User has submitted a profile';

var body='A new registered user has submitted a profile.\n\nName: ' + frm.firstname.value + ' ' + frm.lastname.value + '\n\n';

send_msg(true, null, 20, 0, 'sample@smartsimple.com’, 1100969, 'test@smartsimple.com,test2@smartsimple.com', subject, body);

alert('Sent');

}