| Kongregate Registration for Free Flash Games and Chat with solprovider | |
![]() |
| |
|
Setup1. Download two files from Sun:jaf-1_0_2-upd2.zip = Java Activation Framework javamail-1_3_3-ea.zip = Java Mail 2. Unzip them 3. Put these two jars in build/lenya/webapp/WEB-INF/lib jaf-1.0.2/activation.jar javamail-1.3.3ea/mail.jar 4. Restart Lenya so the new Java libraries are noticed. TestMail Usecase1. Flow JavascriptFILE: {pub}/flow/testmail/code.js function mail() {
Notice setText() has a second parameter "UTF-8". That is pointless in this example, but very important if you are creating the text string from input from a Flow form. Without it, all double-byte input would be converted to question marks ('?':hex 73) and lost forever. With the setting, you can use something like: "NAME: " + model.name + "\n" + model.comment
2. Change the mail server (twice) and the To and From addresses. HINT: Search for "example.com". 3. Usecase XMAP FILE: {pub}/usecase-testmail.xmap <?xml version="1.0" encoding="UTF-8"?>
4. Test. Just add "?lenya.usecase=testmail" to any URL and an email will be sent: http://127.0.0.1:8888/default/live/index.html?lenya.usecase=testmail The browser should return to the homepage. Check the Inbox of the To address to see the email.
|