Page 147 - DCAP512_WAP_AND_WML
P. 147
Unit 10: Email Integration
8. ……………………… elevates communication above the technology used to communicate Notes
the message takes precedence over the media.
9. ……………………… programs are the result of collaboration between mobile carriers and
other companies in different industries with large customer groups.
10. The amount of information transferred per message tends to be lower with chat, where
people are more likely to state opinions rather than ……………………… data.
10.2 Integrating Email into your Application
It is a Java servlet allows you to send email from WAP phone or any another PDA supports
WML. With this servlet you may simulate for example HTML’s tag mailto:
How does it work? You have to create a text template for your mail and pass this file as a parameter
for servlet. You may have more than one template of course. Servlet will read mail settings from
such template and detect what kind of parameters do we need to ask from the user in the dialogue.
Example: For example you may decide to use some static subject for the letter or servlet
will ask user to type this information, etc.
The typical scenario for your WML portal is: suppose you need to give your users the ability to
send some file (e.g. price list, contact agreement etc.) from WML page. Just create a text file
describes mail host, port, subject, source (from) address and the path to attached file. Destination
address will be asked in the dialogue. Add to your WML page the following link:
<a href=”http://your_host/servlet/WmlMailServlet?your_template_file”>Send price list</a>
and your users will be able to activate this mail right from the phone.
How to use it:
(a) copy wmlMailPackage.jar into WEB-INF/lib directory
(b) describe servlet in your web.xml file:
<servlet>
<servlet-name>WmlMailServlet</servlet-name>
<servlet-class>com.jsos.wmlmail.WmlMailServlet</servlet-class>
</servlet>
You can pass template file as a parameter to this servlet and use it in this form:
http://your_host/servlet/WmlMailServlet?template_file
or you may describe template file as an initial parameter (parameter name is config):
<servlet>
<servlet-name>WmlMailServlet</servlet-name>
<servlet-class>com.jsos.wmlmail.WmlMailServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>path_to_your_template_file</param-value>
</init-param>
</servlet>
LOVELY PROFESSIONAL UNIVERSITY 141