Difference between revisions of "Pandora - Send a Message"
From SmartWiki
(2 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
The following function is used to trigger a message. | The following function is used to trigger a message. | ||
− | + | send_msg(flag,callbackfunc,msgtype,format,fromadd,touserid,cc,subject,body) | |
{| border="1" | {| border="1" | ||
Line 27: | Line 27: | ||
|'''body'''||Message body. | |'''body'''||Message body. | ||
|- | |- | ||
− | | '''Returns''' || | + | | '''Returns''' || ssRecordSet object |
|} | |} | ||
Line 46: | Line 46: | ||
<script language= JavaScript > | <script language= JavaScript > | ||
− | function apisend() | + | function apisend() { |
− | |||
− | { | ||
ss_developer_key="developer key"; | ss_developer_key="developer key"; | ||
Line 58: | Line 56: | ||
var body='A new registered user has submitted a profile.\n\nName: ' + frm.firstname.value + ' ' + frm.lastname.value + '\n\n'; | var body='A new registered user has submitted a profile.\n\nName: ' + frm.firstname.value + ' ' + frm.lastname.value + '\n\n'; | ||
− | send_msg(true, | + | send_msg(true, null, 20, 0, 'sample@smartsimple.com’, 1100969, 'test@smartsimple.com,test2@smartsimple.com', subject, body); |
alert('Sent'); | alert('Sent'); |
Latest revision as of 06:44, 13 December 2013
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');
}