| CCXML Voxeo 1.0 Development Guide | Home | Frameset Home |
| body | Data Type: CDATA | Default: Optional |
| The 'body' attribute allows the developer to specify text to insert in the body of the email that is sent out when the element is executed. | ||
| from | Data Type: (email address) | Default: Required |
| The 'from' attribute allows the developer to specify a return address for emails sent through the 'voxeo:sendemail' element. Any valid email address is allowed, provided that it is parseable. | ||
| to | Data Type: (email address) | Default: Required |
| The 'to' attribute allows the developer to specify a return address for emails sent through the 'voxeo:sendemail' element. Any valid email address is allowed, provided that it is parseable. | ||
| type | Data Type: CDATA | Default: none - attribute is optional |
| The 'type' attribute defines the type of email to be sent to the maintainer of the CCXML application. If unspecified, then the resulting email message must be entirely user defined within the 'body' attribute. If, however, the 'type' is set to 'debug', then a whole host of debugging output is included in the body of the email, (very useful information to have for troubleshooting an application that goes belly-up when you aren't watching the realtime logger). | ||
| <?xml version="1.0" encoding="UTF-8" ?>
<!-- NOTE THAT WE *MUST* DECLARE THE xmlns ATTRIBUTE --> <ccxml version="1.0" xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml"> <var name="state0" expr="'init'"/> <var name="myVar1" expr="'foo1'"/> <var name="myVar2" expr="'foo2'"/> <eventhandler statevariable="state0"> <transition state="'init'" event="ccxml.loaded" name="evt"> <assign name="state0" expr="'fetching'"/> <!-- ATTEMPT TO FETCH A BOGUS URL TO FORCE AN ERROR--> <fetch next="'http://myserver.com/myBogusURL.xml'" method="'get'" fetchid="'fetch1'" namelist="myVar1 myVar2"/> </transition> <transition state="'fetching'" event="ccxml.fetch.done" name="evt"> <goto fetchid="evt.fetchid"/> </transition> <transition state="'fetching'" event="error.fetch" name="evt"> <log expr="'*** FETCH ERROR [' + evt.error + '] ***'"/> <!-- CATCH ERROR, AND SEND EMAIL --> <voxeo:sendemail subject="'Insert subject here'" to="'yourEmail@there.com'" from="'myApp@here.com'" type="'debug'" body="'We had an error! \n Time to panic! \n Flee the cities, abandon all hope! \n Or, just send this email to the support folks.'"/> <exit/> </transition> </eventhandler> </ccxml> |
| ----- Original Message -----
From: MyApp@here.com Sent: Thursday, March 18, 2004 3:06 PM Subject: SendEmail from CCXML We had an error! Time to panic! Flee the cities, abandon all hope! Or, just send this email to the support folks. ================================================================= Session Details ================================================================= Date/Time : 20:06:54 18/03/2004 Application ID : 19853 Session ID : 3f0d9bfb10e6941025b1338e742adf49 Initial URL : http://MyServer.com/MyApp.xml Current URL : http://MyServer.com/MyApp.xml Calling Number (ANI) : 1112223333 Called Number (DNIS) : 4445556666 Last Error : path executed ================================================================= CCXML Variables ================================================================= URL1 = http://MyServer.com/MyApp.xml URL2 = undefined URL3 = undefined redirectNumber = undefined state0 = fetching myVar1 = foo1 myVar2 = foo2 'fetch1' = 8299161c79f5c68ff136ecf6c56f2e20 ================================================================= Current Document ================================================================= <?xml version="1.0" encoding="UTF-8" ?> <!-- NOTE THAT WE *MUST* DECLARE THE xmlns ATTRIBUTE --> <ccxml version="1.0" xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml"> <var name="state0" expr="'init'"/> <var name="myVar1" expr="'foo1'"/> <var name="myVar2" expr="'foo2'"/> <eventhandler statevariable="state0"> <!-- ************ CCXML LOADS / FETCH NEW DOCUMENT ************ --> <transition state="'init'" event="ccxml.loaded" name="evt"> <assign name="state0" expr="'fetching'"/> <fetch next="'http://myserver.com/myBogusURL.xml'" method="'get'" fetchid="'fetch1'" namelist="myVar1 myVar2"/> </transition> <transition state="'fetching'" event="ccxml.fetch.done" name="evt"> <goto fetchid="evt.fetchid"/> </transition> <transition state="'fetching'" event="error.fetch" name="evt"> <log expr="'*** FETCH ERROR [' + evt.error + '] ***'"/> <voxeo:sendemail to="'mhenry@voxeo.com'" from="'MyApp@here.com'" type="'debug'" body="'We had an error! \n Time to panic! \n Flee the cities, abandon all hope! \n Or, just send this email to the support folks.'"/> <exit/> </transition> </eventhandler> </ccxml> -- |
| ANNOTATIONS: EXISTING POSTS |
| login |