📄 htmlemail.html
字号:
<TD><CODE><A HREF="../../../../../org/apache/turbine/util/mail/MultiPartEmail.html#attach(javax.activation.DataSource, java.lang.String, java.lang.String)">attach</A>, <A HREF="../../../../../org/apache/turbine/util/mail/MultiPartEmail.html#attach(javax.activation.DataSource, java.lang.String, java.lang.String, java.lang.String)">attach</A>, <A HREF="../../../../../org/apache/turbine/util/mail/MultiPartEmail.html#attach(org.apache.turbine.util.mail.EmailAttachment)">attach</A>, <A HREF="../../../../../org/apache/turbine/util/mail/MultiPartEmail.html#attach(java.net.URL, java.lang.String, java.lang.String)">attach</A>, <A HREF="../../../../../org/apache/turbine/util/mail/MultiPartEmail.html#attach(java.net.URL, java.lang.String, java.lang.String, java.lang.String)">attach</A>, <A HREF="../../../../../org/apache/turbine/util/mail/MultiPartEmail.html#init()">init</A>, <A HREF="../../../../../org/apache/turbine/util/mail/MultiPartEmail.html#initCriteria(org.apache.torque.util.Criteria)">initCriteria</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_org.apache.turbine.util.mail.Email"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class org.apache.turbine.util.mail.<A HREF="../../../../../org/apache/turbine/util/mail/Email.html">Email</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/turbine/util/mail/Email.html#addBcc(java.lang.String, java.lang.String)">addBcc</A>, <A HREF="../../../../../org/apache/turbine/util/mail/Email.html#addCc(java.lang.String, java.lang.String)">addCc</A>, <A HREF="../../../../../org/apache/turbine/util/mail/Email.html#addReplyTo(java.lang.String, java.lang.String)">addReplyTo</A>, <A HREF="../../../../../org/apache/turbine/util/mail/Email.html#addTo(java.lang.String, java.lang.String)">addTo</A>, <A HREF="../../../../../org/apache/turbine/util/mail/Email.html#initialize(org.apache.torque.util.Criteria)">initialize</A>, <A HREF="../../../../../org/apache/turbine/util/mail/Email.html#setCharset(java.lang.String)">setCharset</A>, <A HREF="../../../../../org/apache/turbine/util/mail/Email.html#setFrom(java.lang.String, java.lang.String)">setFrom</A>, <A HREF="../../../../../org/apache/turbine/util/mail/Email.html#setSentDate(java.util.Date)">setSentDate</A>, <A HREF="../../../../../org/apache/turbine/util/mail/Email.html#setSubject(java.lang.String)">setSubject</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="htmlContent"><!-- --></A><H3>htmlContent</H3><PRE>protected javax.mail.internet.MimeMultipart <B>htmlContent</B></PRE><DL></DL><HR><A NAME="text"><!-- --></A><H3>text</H3><PRE>protected java.lang.String <B>text</B></PRE><DL></DL><HR><A NAME="html"><!-- --></A><H3>html</H3><PRE>protected java.lang.String <B>html</B></PRE><DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="HtmlEmail()"><!-- --></A><H3>HtmlEmail</H3><PRE>public <B>HtmlEmail</B>() throws javax.mail.MessagingException</PRE><DL><DD>Basic constructor.<DD><DL><DT><B>Throws:</B><DD><CODE>MessagingException.</CODE> - </DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getHtmlContent()"><!-- --></A><H3>getHtmlContent</H3><PRE>public javax.mail.internet.MimeMultipart <B>getHtmlContent</B>()</PRE><DL><DD>Instantiates a new MimeMultipart object if it isn't already instantiated.<DD><DL><DT><B>Returns:</B><DD>A MimeMultipart object</DL></DD></DL><HR><A NAME="setTextMsg(java.lang.String)"><!-- --></A><H3>setTextMsg</H3><PRE>public <A HREF="../../../../../org/apache/turbine/util/mail/HtmlEmail.html">HtmlEmail</A> <B>setTextMsg</B>(java.lang.String text) throws javax.mail.MessagingException</PRE><DL><DD>Set the text content.<DD><DL><DT><B>Parameters:</B><DD><CODE>text</CODE> - A String.<DT><B>Returns:</B><DD>An HtmlEmail.<DT><B>Throws:</B><DD><CODE>MessagingException.</CODE> - </DL></DD></DL><HR><A NAME="setHtmlMsg(java.lang.String)"><!-- --></A><H3>setHtmlMsg</H3><PRE>public <A HREF="../../../../../org/apache/turbine/util/mail/HtmlEmail.html">HtmlEmail</A> <B>setHtmlMsg</B>(java.lang.String html) throws javax.mail.MessagingException</PRE><DL><DD>Set the HTML content.<DD><DL><DT><B>Parameters:</B><DD><CODE>html</CODE> - A String.<DT><B>Returns:</B><DD>An HtmlEmail.<DT><B>Throws:</B><DD><CODE>MessagingException.</CODE> - </DL></DD></DL><HR><A NAME="setHtmlMsg(org.apache.ecs.Document)"><!-- --></A><H3>setHtmlMsg</H3><PRE>public <A HREF="../../../../../org/apache/turbine/util/mail/HtmlEmail.html">HtmlEmail</A> <B>setHtmlMsg</B>(org.apache.ecs.Document doc) throws javax.mail.MessagingException</PRE><DL><DD>Set the HTML content based on an ECS document.<DD><DL><DT><B>Parameters:</B><DD><CODE>doc</CODE> - A Document.<DT><B>Returns:</B><DD>An HtmlEmail.<DT><B>Throws:</B><DD><CODE>MessagingException.</CODE> - </DL></DD></DL><HR><A NAME="setMsg(java.lang.String)"><!-- --></A><H3>setMsg</H3><PRE>public <A HREF="../../../../../org/apache/turbine/util/mail/Email.html">Email</A> <B>setMsg</B>(java.lang.String msg) throws javax.mail.MessagingException</PRE><DL><DD>Set the message. <p>This method overrides the MultiPartEmail setMsg() method in order to send an HTML message instead of a full text message in the mail body. The message is formatted in HTML for the HTML part of the message, it is let as is in the alternate text part.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/mail/MultiPartEmail.html#setMsg(java.lang.String)">setMsg</A></CODE> in class <CODE><A HREF="../../../../../org/apache/turbine/util/mail/MultiPartEmail.html">MultiPartEmail</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>msg</CODE> - A String.<DT><B>Returns:</B><DD>An Email.<DT><B>Throws:</B><DD><CODE>MessagingException.</CODE> - </DL></DD></DL><HR><A NAME="embed(java.net.URL, java.lang.String)"><!-- --></A><H3>embed</H3><PRE>public java.lang.String <B>embed</B>(java.net.URL url, java.lang.String name) throws javax.mail.MessagingException</PRE><DL><DD>Embeds an URL in the HTML. <p>This method allows to embed a file located by an URL into the mail body. It allows, for instance, to add inline images to the email. Inline files may be referenced with a <code>cid:xxxxxx</code> URL, where xxxxxx is the Content-ID returned by the embed function. <p>Example of use:<br><code><pre> HtmlEmail he = new HtmlEmail(); he.setHtmlMsg("<html><img src=cid:"+embed("file:/my/image.gif","image.gif")+"></html>"); // code to set the others email fields (not shown) </pre></code><DD><DL><DT><B>Parameters:</B><DD><CODE>url</CODE> - The URL of the file.<DD><CODE>name</CODE> - The name that will be set in the filename header field.<DT><B>Returns:</B><DD>A String with the Content-ID of the file.<DT><B>Throws:</B><DD><CODE>MessagingException.</CODE> - </DL></DD></DL><HR><A NAME="send()"><!-- --></A><H3>send</H3><PRE>public void <B>send</B>() throws javax.mail.MessagingException</PRE><DL><DD>Does the work of actually sending the email.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/mail/Email.html#send()">send</A></CODE> in class <CODE><A HREF="../../../../../org/apache/turbine/util/mail/Email.html">Email</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>MessagingException,</CODE> - if there was an error.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/HtmlEmail.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/turbine/util/mail/EmailAttachment.html"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/turbine/util/mail/MailMessage.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="HtmlEmail.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR>Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -