Page 148 - DCAP512_WAP_AND_WML
P. 148

WAP & WML




                    Notes          and use servlet in this form:
                                   http://your_host/servlet/WmlMailServlet
                                   Template file is a text describes mail settings  and template for mail.  In this file you can set
                                   address of your SMTP relay, smtp port, domain and describe contents for your letter. Appropriate
                                   WML form will be composed dynamically according to settings in the template file.
                                   When you describe your letter you can use meta-variables: $from, $to, $subject, $body. These
                                   variables will be replaced by the appropriate field value from the submitted form. Letter will be
                                   also composed dynamically, when you submit form in WML. You can also attach some files
                                   saved on your server (e.g. price list from your company, your resume etc.)




                                     Notes  Template file has got free format, but description of any parameter must starts with
                                     the appropriate reserved word on the new line.

                                   Current version supports the following list of parameters:
                                      Mailhost: describes your smtp host. This parameter is mandatory
                                      Port: describes smtp port. By default it is 25.

                                      Domain: describes your domain. This parameter is mandatory
                                      From: describes source address.
                                      To: describes destination address.
                                      Subject: set letter’s subject

                                      Body: set letters body
                                      Attach: you can set here a list of files you want to be attached to the composed letter.
                                      After: you can set here an URL for some WML page user will jump to after mail sending.
                                      Encoding: character encoding for input parameters. Default value is ISO-8859-1

                                      Html: describes format. Possible values are true or false. If this value if true servlet will
                                       send letter in HTML format. Default value is false.


                                          Example: E.g. the simplest configuration file is:
                                   Mailhost:smtp.your_company.com
                                   Domain:your_company.com
                                   Port:25

                                   From:$from
                                   To:$to
                                   Subject:$subject

                                   Body:$body
                                   After:/index.wml
                                   Another example: for some Short Message service you can describe field To as
                                   To:$to@acme.com




          142                               LOVELY PROFESSIONAL UNIVERSITY
   143   144   145   146   147   148   149   150   151   152   153