ASP Development example of WAP Simple mail system

Source: Internet
Author: User
Tags mail

With the increasing number of mobile phone users, WAP sites such as springing up quickly, mobile phone mailboxes are constantly appearing in front of people, the author has developed a set of mobile phone mailbox system, but because of time and then have been busy working things, system function has not been strengthened, Today, with the help of IT168 original network open out, and everyone to share, I hope we can exaggerated, strengthen the system function, can be better applied in practice.

Test software: Opera m3gate

Test model: eg730+ Nokia 6681 Moto v3i

Mail component: W3 jmail 4.4

Introduction of WML structure

First of all, we first make a simple introduction to the structure of WML, so that we can better browse the source.

  〈?xml version="1.0"?〉
  〈!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1xml"〉
  〈wml〉
  〈head〉
  〈access/〉
  〈meta..../〉
  〈/head〉
  〈card〉
  Some contents...
  〈/card〉
  〈wml〉

We give the simplest example based on the above structure:

  〈% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %〉
  〈%Response.ContentType = "text/vnd.wap.wml; charset=UTF-8"%〉
  〈?xml version="1.0"?〉
  〈!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1xml"〉
  〈wml〉
  〈card title="邮件系统"〉
  〈p〉
  WML开发邮件系统
  〈/p〉
  〈/card〉
  〈/wml〉

Save the above code as example.asp, directly through the M3gate view, the specific effect as shown in Figure I.

Figure I

"Mail system" this paragraph of text for UTF-8 code, in order to better apply to mobile browsing, the proposed code format using UTF-8, you can download WAP encoder converter to Chinese conversion.

Since our system is developed in ASP language, we need to add the following two pieces of code before the above code snippet:

〈% @LANGUAGE = "VBSCRIPT" codepage= "65001"%〉

Specifies that IIS reads the passed string (form submission, address bar delivery, and so on) in a UTF-8 encoded format, and you can change 65001 to 936 if you need to read in GB2312 format.

〈%response.contenttype = "TEXT/VND.WAP.WML; Charset=utf-8 "%〉

Specifies that the page output format is WML and is encoded as UTF-8

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.