JSPKit项目:JavaMail

ZDNet软件频道 时间:2001-07-09 作者:Jayson Falkner |  我要评论()
本文关键词:
本文所有资料都来自JSP Insider的JSPKit。JSPKit可用于商业或非商业用途,如Lesser GNU中所述。感谢上述作者为本节的JSP Kit所做的工作。

标记库定义

这里是当前的JavaMail.tld,并链接到了网上文档。

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
         "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
  <tlibversion>1.0</tlibversion>
  <jspversion>1.1</jspversion>
  <shortname>JavaMailTags</shortname>
  <uri>http://www.jspinsider.com</uri>
  <info>
         A unofficial tag library for using Sun's JavaMail API. This taglibrary 
        focuses only on supporting the JavaMail API 100%.
  </info>
  <tag>
    <name>mimeMessage</name>
    <tagclass>com.jspinsider.jspkit.javamail.JavaMailMimeMessageTag</tagclass>
    <info>Represents a MimeMessage from the JavaMail API.</info>
    <attribute>
        <name>server</name>
        <required>true</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <name>recipient</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <name>from</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <name>subject</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
        <name>text</name>
        <required>false</required>
        <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>
  <tag>
    <name>bodyPart</name>
    <tagclass>com.jspinsider.jspkit.javamail.JavaMailMimeBodyPartTag</tagclass>
    <info>Adds a MimeBodyPart to your message.</info>
    <attribute>
        <name>uri</name>
        <required>false</required>
    </attribute>
    <attribute>
        <name>type</name>
        <required>true</required>
    </attribute>
    <attribute>
        <name>content</name>
        <required>false</required>
    </attribute>
  </tag>
  <tag>
    <name>text</name>
    <tagclass>com.jspinsider.jspkit.javamail.JavaMailMimeMessageTextTag</tagclass>
    <info>Sets the body text for your JavaMailMimeMessageTag.</info>
  </tag>
  <tag>
    <name>recipient</name>
    <tagclass>com.jspinsider.jspkit.javamail.JavaMailMimeMessageRecipientTag</tagclass>
    <info>Adds a recipient for a JavaMailMimeMessageTag.</info>
    <attribute>
        <name>type</name>
        <required>false</required>
    </attribute>
  </tag>
</taglib>

现在可以开始使用JavaMail标记了,下面是一些例子。


百度大联盟认证黄金会员Copyright© 1997- CNET Networks 版权所有。 ZDNet 是CNET Networks公司注册服务商标。
中华人民共和国电信与信息服务业务经营许可证编号:京ICP证010391号 京ICP备09041801号-159
京公网安备:1101082134