E-MAILING IN KHAMELEON
Khameleon Uses Oracle DB server to send out emails. This is implemented using Oracle supplied DB functionality using utl_smtp. So prior to initiating the SEND functionality, the DB should have access to any attachments that will be part of the email. i.e. the DB server should be able to see the SMTP Server and also be able to access the attachment using http:// protocol (if there is an attachment to an email).
Company Control Record Setup.
1. Mail Server Name:
Name or IP Address of the SMTP Server:
Example: 192.1.1.232 or YourDomain.com
Note: server name could work too but IP takes out names resolution issues if any.
2. Domain Name: (optional)
This is the Domain Name for the local (sending) host. Used to identification purpose only.
Example - YourDomain.com.
3. Email Attachments Path:
This is the attachment/file path from the mail server which is the Oracle Database Server (NOT the web/application server/10gAS) where the emails are dispatched from. This MUST be in "http://" format. This must be visible from the Database server. If there is an attachment to an email, the Database server will download the file using the http path and sends the email with attachment.
Example: http://clworion.clw.khameleonsoftware.biz/attach/
Verification:
a. Copy an image file or PDF file to this directory “attach”. Sample file name “Khameleon.jpg”
b. Access this file using HTTP. Something like below http://clworion.clw.khameleonsoftware.biz/attach/Khameleon.jpg should show the file image in the browser.
4. Client Attach Upload Directory:
This is the attachments/file path from client to the directory where the files are stored. The path is relative from the client/PC where Khameleon Application is being launched. This should be a shared drive where all the attachments are stored. A UNC path is suggested to avoid the drive map inconsistencies.
Example: \\clworion\khamel\attach
Verification:
a. Copy an image file or PDF file to this directory “attach”. Sample file name “Khameleon.jpg”
b. Access this file using HTTP. Something like below http://clworion.clw.khameleonsoftware.biz/attach/ should open the file with default program.
5. Mail Server Port: 25
6. Max Dispatch Tries: 100
Test Emailing from Database Sample
Modify Khamel\db\admin\kham_test_db_email.sql to plug-in appropriate information - from, to, smpt server. Execute this in the Khameleon application schema. If is successful (sending/receiving emails), that implies a simple email functionality is working. (Make sure to check SPAM/Junk folder on the receiving end..Some time it will end up there)
-- Use below to test
-- execute kham_test_DB_email('bnemani@khamsoft.com', 'bnemani@khamsoft.com', '192.1.1.232');
Test Emailing A report output – Example (Nothing to do with Khameleon Email. This is pure Oracle Reports functionality)
Emailing a Report:
http://clwhmitest.clw.khameleonsoftware.biz:7781/reports/rwservlet?report=test.rdf&server=RepServerName&destype=mail&from=fromEmailAccount@khamsoft.com&desname=ToEmailAccount@khamsoft.com&desformat=html&userid=khameleon/start91@DBConnectString
Sample URL for Khameleon Report:
HTML Format:
http://clwHermes/reports/rwservlet?destype=mail&from=bnemani@khamsoft.com&desname=bnemani@khamsoft.com&desformat=HTML&server=clwhermes&mode=bitmap&userid=khameleon/start91@dev10g&report=/khamel/bin/ctbstcde.rdf
PDF Format:
http://clwHermes/reports/rwservlet?destype=mail&from=bnemani@khamsoft.com&desname=bnemani@khamsoft.com&desformat=PDF&server=clwhermes&mode=bitmap&userid=khameleon/start91@dev10g&report=/khamel/bin/ctbstcde.rdf