123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!-- NewPage -->
- <html lang="de">
- <head>
- <!-- Generated by javadoc -->
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>HtmlEmail (Apache Commons Email 1.5 API)</title>
- <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
- <script type="text/javascript" src="../../../../script.js"></script>
- </head>
- <body>
- <script type="text/javascript"><!--
- try {
- if (location.href.indexOf('is-external=true') == -1) {
- parent.document.title="HtmlEmail (Apache Commons Email 1.5 API)";
- }
- }
- catch(err) {
- }
- //-->
- var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10};
- var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
- var altColor = "altColor";
- var rowColor = "rowColor";
- var tableTab = "tableTab";
- var activeTableTab = "activeTableTab";
- </script>
- <noscript>
- <div>JavaScript is disabled on your browser.</div>
- </noscript>
- <!-- ========= START OF TOP NAVBAR ======= -->
- <div class="topNav"><a name="navbar.top">
- <!-- -->
- </a>
- <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
- <a name="navbar.top.firstrow">
- <!-- -->
- </a>
- <ul class="navList" title="Navigation">
- <li><a href="../../../../overview-summary.html">Overview</a></li>
- <li><a href="package-summary.html">Package</a></li>
- <li class="navBarCell1Rev">Class</li>
- <li><a href="class-use/HtmlEmail.html">Use</a></li>
- <li><a href="package-tree.html">Tree</a></li>
- <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
- <li><a href="../../../../index-all.html">Index</a></li>
- <li><a href="../../../../help-doc.html">Help</a></li>
- </ul>
- </div>
- <div class="subNav">
- <ul class="navList">
- <li><a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail"><span class="typeNameLink">Prev Class</span></a></li>
- <li><a href="../../../../org/apache/commons/mail/ImageHtmlEmail.html" title="class in org.apache.commons.mail"><span class="typeNameLink">Next Class</span></a></li>
- </ul>
- <ul class="navList">
- <li><a href="../../../../index.html?org/apache/commons/mail/HtmlEmail.html" target="_top">Frames</a></li>
- <li><a href="HtmlEmail.html" target="_top">No Frames</a></li>
- </ul>
- <ul class="navList" id="allclasses_navbar_top">
- <li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
- </ul>
- <div>
- <script type="text/javascript"><!--
- allClassesLink = document.getElementById("allclasses_navbar_top");
- if(window==top) {
- allClassesLink.style.display = "block";
- }
- else {
- allClassesLink.style.display = "none";
- }
- //-->
- </script>
- </div>
- <div>
- <ul class="subNavList">
- <li>Summary: </li>
- <li>Nested | </li>
- <li><a href="#field.summary">Field</a> | </li>
- <li><a href="#constructor.summary">Constr</a> | </li>
- <li><a href="#method.summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li><a href="#field.detail">Field</a> | </li>
- <li><a href="#constructor.detail">Constr</a> | </li>
- <li><a href="#method.detail">Method</a></li>
- </ul>
- </div>
- <a name="skip.navbar.top">
- <!-- -->
- </a></div>
- <!-- ========= END OF TOP NAVBAR ========= -->
- <!-- ======== START OF CLASS DATA ======== -->
- <div class="header">
- <div class="subTitle">org.apache.commons.mail</div>
- <h2 title="Class HtmlEmail" class="title">Class HtmlEmail</h2>
- </div>
- <div class="contentContainer">
- <ul class="inheritance">
- <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
- <li>
- <ul class="inheritance">
- <li><a href="../../../../org/apache/commons/mail/Email.html" title="class in org.apache.commons.mail">org.apache.commons.mail.Email</a></li>
- <li>
- <ul class="inheritance">
- <li><a href="../../../../org/apache/commons/mail/MultiPartEmail.html" title="class in org.apache.commons.mail">org.apache.commons.mail.MultiPartEmail</a></li>
- <li>
- <ul class="inheritance">
- <li>org.apache.commons.mail.HtmlEmail</li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- <div class="description">
- <ul class="blockList">
- <li class="blockList">
- <dl>
- <dt>Direct Known Subclasses:</dt>
- <dd><a href="../../../../org/apache/commons/mail/ImageHtmlEmail.html" title="class in org.apache.commons.mail">ImageHtmlEmail</a></dd>
- </dl>
- <hr>
- <br>
- <pre>public class <span class="typeNameLabel">HtmlEmail</span>
- extends <a href="../../../../org/apache/commons/mail/MultiPartEmail.html" title="class in org.apache.commons.mail">MultiPartEmail</a></pre>
- <div class="block">An HTML multipart email.
- <p>This class is used to send HTML formatted email. A text message
- can also be set for HTML unaware email clients, such as text-based
- email clients.
- <p>This class also inherits from <a href="../../../../org/apache/commons/mail/MultiPartEmail.html" title="class in org.apache.commons.mail"><code>MultiPartEmail</code></a>, so it is easy to
- add attachments to the email.
- <p>To send an email in HTML, one should create a <code>HtmlEmail</code>, then
- use the <a href="../../../../org/apache/commons/mail/Email.html#setFrom-java.lang.String-"><code>Email.setFrom(String)</code></a>, <a href="../../../../org/apache/commons/mail/Email.html#addTo-java.lang.String-"><code>Email.addTo(String)</code></a> etc. methods.
- The HTML content can be set with the <a href="../../../../org/apache/commons/mail/HtmlEmail.html#setHtmlMsg-java.lang.String-"><code>setHtmlMsg(String)</code></a> method. The
- alternative text content can be set with <a href="../../../../org/apache/commons/mail/HtmlEmail.html#setTextMsg-java.lang.String-"><code>setTextMsg(String)</code></a>.
- <p>Either the text or HTML can be omitted, in which case the "main"
- part of the multipart becomes whichever is supplied rather than a
- <code>multipart/alternative</code>.
- <h3>Embedding Images and Media</h3>
- <p>It is also possible to embed URLs, files, or arbitrary
- <code>DataSource</code>s directly into the body of the mail:
- <pre>
- HtmlEmail he = new HtmlEmail();
- File img = new File("my/image.gif");
- PNGDataSource png = new PNGDataSource(decodedPNGOutputStream); // a custom class
- StringBuffer msg = new StringBuffer();
- msg.append("<html><body>");
- msg.append("<img src=cid:").append(he.embed(img)).append(">");
- msg.append("<img src=cid:").append(he.embed(png)).append(">");
- msg.append("</body></html>");
- he.setHtmlMsg(msg.toString());
- // code to set the other email fields (not shown)
- </pre>
- <p>Embedded entities are tracked by their name, which for <code>File</code>s is
- the filename itself and for <code>URL</code>s is the canonical path. It is
- an error to bind the same name to more than one entity, and this class will
- attempt to validate that for <code>File</code>s and <code>URL</code>s. When
- embedding a <code>DataSource</code>, the code uses the <code>equals()</code>
- method defined on the <code>DataSource</code>s to make the determination.</div>
- <dl>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.0</dd>
- </dl>
- </li>
- </ul>
- </div>
- <div class="summary">
- <ul class="blockList">
- <li class="blockList">
- <!-- =========== FIELD SUMMARY =========== -->
- <ul class="blockList">
- <li class="blockList"><a name="field.summary">
- <!-- -->
- </a>
- <h3>Field Summary</h3>
- <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
- <caption><span>Fields</span><span class="tabEnd"> </span></caption>
- <tr>
- <th class="colFirst" scope="col">Modifier and Type</th>
- <th class="colLast" scope="col">Field and Description</th>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>static int</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#CID_LENGTH">CID_LENGTH</a></span></code>
- <div class="block">Definition of the length of generated CID's.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#html">html</a></span></code>
- <div class="block">Html part of the message.</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,org.apache.commons.mail.HtmlEmail.InlineImage></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#inlineEmbeds">inlineEmbeds</a></span></code>
- <div class="block">Embedded images Map<String, InlineImage> where the key is the
- user-defined image name.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><org.apache.commons.mail.HtmlEmail.InlineImage></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#inlineImages">inlineImages</a></span></code>
- <div class="block"><span class="deprecatedLabel">Deprecated.</span>
- <div class="block"><span class="deprecationComment">As of commons-email 1.1, no longer used. Inline embedded
- objects are now stored in <a href="../../../../org/apache/commons/mail/HtmlEmail.html#inlineEmbeds"><code>inlineEmbeds</code></a>.</span></div>
- </div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#text">text</a></span></code>
- <div class="block">Text part of the message.</div>
- </td>
- </tr>
- </table>
- <ul class="blockList">
- <li class="blockList"><a name="fields.inherited.from.class.org.apache.commons.mail.Email">
- <!-- -->
- </a>
- <h3>Fields inherited from class org.apache.commons.mail.<a href="../../../../org/apache/commons/mail/Email.html" title="class in org.apache.commons.mail">Email</a></h3>
- <code><a href="../../../../org/apache/commons/mail/Email.html#ATTACHMENTS">ATTACHMENTS</a>, <a href="../../../../org/apache/commons/mail/Email.html#authenticator">authenticator</a>, <a href="../../../../org/apache/commons/mail/Email.html#bccList">bccList</a>, <a href="../../../../org/apache/commons/mail/Email.html#bounceAddress">bounceAddress</a>, <a href="../../../../org/apache/commons/mail/Email.html#ccList">ccList</a>, <a href="../../../../org/apache/commons/mail/Email.html#charset">charset</a>, <a href="../../../../org/apache/commons/mail/Email.html#content">content</a>, <a href="../../../../org/apache/commons/mail/Email.html#CONTENT_TYPE">CONTENT_TYPE</a>, <a href="../../../../org/apache/commons/mail/Email.html#contentType">contentType</a>, <a href="../../../../org/apache/commons/mail/Email.html#debug">debug</a>, <a href="../../../../org/apache/commons/mail/Email.html#EMAIL_BODY">EMAIL_BODY</a>, <a href="../../../../org/apache/commons/mail/Email.html#EMAIL_SUBJECT">EMAIL_SUBJECT</a>, <a href="../../../../org/apache/commons/mail/Email.html#emailBody">emailBody</a>, <a href="../../../../org/apache/commons/mail/Email.html#FILE_SERVER">FILE_SERVER</a>, <a href="../../../../org/apache/commons/mail/Email.html#fromAddress">fromAddress</a>, <a href="../../../../org/apache/commons/mail/Email.html#headers">headers</a>, <a href="../../../../org/apache/commons/mail/Email.html#hostName">hostName</a>, <a href="../../../../org/apache/commons/mail/Email.html#ISO_8859_1">ISO_8859_1</a>, <a href="../../../../org/apache/commons/mail/Email.html#KOI8_R">KOI8_R</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_DEBUG">MAIL_DEBUG</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_HOST">MAIL_HOST</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_PORT">MAIL_PORT</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_SMTP_AUTH">MAIL_SMTP_AUTH</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_SMTP_CONNECTIONTIMEOUT">MAIL_SMTP_CONNECTIONTIMEOUT</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_SMTP_FROM">MAIL_SMTP_FROM</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_SMTP_PASSWORD">MAIL_SMTP_PASSWORD</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_SMTP_SOCKET_FACTORY_CLASS">MAIL_SMTP_SOCKET_FACTORY_CLASS</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_SMTP_SOCKET_FACTORY_FALLBACK">MAIL_SMTP_SOCKET_FACTORY_FALLBACK</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_SMTP_SOCKET_FACTORY_PORT">MAIL_SMTP_SOCKET_FACTORY_PORT</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_SMTP_TIMEOUT">MAIL_SMTP_TIMEOUT</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_SMTP_USER">MAIL_SMTP_USER</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_TRANSPORT_PROTOCOL">MAIL_TRANSPORT_PROTOCOL</a>, <a href="../../../../org/apache/commons/mail/Email.html#MAIL_TRANSPORT_TLS">MAIL_TRANSPORT_TLS</a>, <a href="../../../../org/apache/commons/mail/Email.html#message">message</a>, <a href="../../../../org/apache/commons/mail/Email.html#popBeforeSmtp">popBeforeSmtp</a>, <a href="../../../../org/apache/commons/mail/Email.html#popHost">popHost</a>, <a href="../../../../org/apache/commons/mail/Email.html#popPassword">popPassword</a>, <a href="../../../../org/apache/commons/mail/Email.html#popUsername">popUsername</a>, <a href="../../../../org/apache/commons/mail/Email.html#RECEIVER_EMAIL">RECEIVER_EMAIL</a>, <a href="../../../../org/apache/commons/mail/Email.html#RECEIVER_NAME">RECEIVER_NAME</a>, <a href="../../../../org/apache/commons/mail/Email.html#replyList">replyList</a>, <a href="../../../../org/apache/commons/mail/Email.html#SENDER_EMAIL">SENDER_EMAIL</a>, <a href="../../../../org/apache/commons/mail/Email.html#SENDER_NAME">SENDER_NAME</a>, <a href="../../../../org/apache/commons/mail/Email.html#sentDate">sentDate</a>, <a href="../../../../org/apache/commons/mail/Email.html#SMTP">SMTP</a>, <a href="../../../../org/apache/commons/mail/Email.html#smtpPort">smtpPort</a>, <a href="../../../../org/apache/commons/mail/Email.html#socketConnectionTimeout">socketConnectionTimeout</a>, <a href="../../../../org/apache/commons/mail/Email.html#socketTimeout">socketTimeout</a>, <a href="../../../../org/apache/commons/mail/Email.html#ssl">ssl</a>, <a href="../../../../org/apache/commons/mail/Email.html#sslSmtpPort">sslSmtpPort</a>, <a href="../../../../org/apache/commons/mail/Email.html#subject">subject</a>, <a href="../../../../org/apache/commons/mail/Email.html#TEXT_HTML">TEXT_HTML</a>, <a href="../../../../org/apache/commons/mail/Email.html#TEXT_PLAIN">TEXT_PLAIN</a>, <a href="../../../../org/apache/commons/mail/Email.html#tls">tls</a>, <a href="../../../../org/apache/commons/mail/Email.html#toList">toList</a>, <a href="../../../../org/apache/commons/mail/Email.html#US_ASCII">US_ASCII</a></code></li>
- </ul>
- </li>
- </ul>
- <!-- ======== CONSTRUCTOR SUMMARY ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="constructor.summary">
- <!-- -->
- </a>
- <h3>Constructor Summary</h3>
- <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
- <caption><span>Constructors</span><span class="tabEnd"> </span></caption>
- <tr>
- <th class="colOne" scope="col">Constructor and Description</th>
- </tr>
- <tr class="altColor">
- <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#HtmlEmail--">HtmlEmail</a></span>()</code> </td>
- </tr>
- </table>
- </li>
- </ul>
- <!-- ========== METHOD SUMMARY =========== -->
- <ul class="blockList">
- <li class="blockList"><a name="method.summary">
- <!-- -->
- </a>
- <h3>Method Summary</h3>
- <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
- <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
- <tr>
- <th class="colFirst" scope="col">Modifier and Type</th>
- <th class="colLast" scope="col">Method and Description</th>
- </tr>
- <tr id="i0" class="altColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#buildMimeMessage--">buildMimeMessage</a></span>()</code>
- <div class="block">Does the work of actually building the MimeMessage.</div>
- </td>
- </tr>
- <tr id="i1" class="rowColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#embed-javax.activation.DataSource-java.lang.String-">embed</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation">DataSource</a> dataSource,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code>
- <div class="block">Embeds the specified <code>DataSource</code> in the HTML using a
- randomly generated Content-ID.</div>
- </td>
- </tr>
- <tr id="i2" class="altColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#embed-javax.activation.DataSource-java.lang.String-java.lang.String-">embed</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation">DataSource</a> dataSource,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> cid)</code>
- <div class="block">Embeds the specified <code>DataSource</code> in the HTML using the
- specified Content-ID.</div>
- </td>
- </tr>
- <tr id="i3" class="rowColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#embed-java.io.File-">embed</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file)</code>
- <div class="block">Embeds a file in the HTML.</div>
- </td>
- </tr>
- <tr id="i4" class="altColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#embed-java.io.File-java.lang.String-">embed</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> cid)</code>
- <div class="block">Embeds a file in the HTML.</div>
- </td>
- </tr>
- <tr id="i5" class="rowColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#embed-java.lang.String-java.lang.String-">embed</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> urlString,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code>
- <div class="block">Attempts to parse the specified <code>String</code> as a URL that will
- then be embedded in the message.</div>
- </td>
- </tr>
- <tr id="i6" class="altColor">
- <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#embed-java.net.URL-java.lang.String-">embed</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a> url,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code>
- <div class="block">Embeds an URL in the HTML.</div>
- </td>
- </tr>
- <tr id="i7" class="rowColor">
- <td class="colFirst"><code><a href="../../../../org/apache/commons/mail/HtmlEmail.html" title="class in org.apache.commons.mail">HtmlEmail</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#setHtmlMsg-java.lang.String-">setHtmlMsg</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> aHtml)</code>
- <div class="block">Set the HTML content.</div>
- </td>
- </tr>
- <tr id="i8" class="altColor">
- <td class="colFirst"><code><a href="../../../../org/apache/commons/mail/Email.html" title="class in org.apache.commons.mail">Email</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#setMsg-java.lang.String-">setMsg</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> msg)</code>
- <div class="block">Set the message.</div>
- </td>
- </tr>
- <tr id="i9" class="rowColor">
- <td class="colFirst"><code><a href="../../../../org/apache/commons/mail/HtmlEmail.html" title="class in org.apache.commons.mail">HtmlEmail</a></code></td>
- <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/mail/HtmlEmail.html#setTextMsg-java.lang.String-">setTextMsg</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> aText)</code>
- <div class="block">Set the text content.</div>
- </td>
- </tr>
- </table>
- <ul class="blockList">
- <li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.mail.MultiPartEmail">
- <!-- -->
- </a>
- <h3>Methods inherited from class org.apache.commons.mail.<a href="../../../../org/apache/commons/mail/MultiPartEmail.html" title="class in org.apache.commons.mail">MultiPartEmail</a></h3>
- <code><a href="../../../../org/apache/commons/mail/MultiPartEmail.html#addPart-javax.mail.internet.MimeMultipart-">addPart</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#addPart-javax.mail.internet.MimeMultipart-int-">addPart</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#addPart-java.lang.String-java.lang.String-">addPart</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#attach-javax.activation.DataSource-java.lang.String-java.lang.String-">attach</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#attach-javax.activation.DataSource-java.lang.String-java.lang.String-java.lang.String-">attach</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#attach-org.apache.commons.mail.EmailAttachment-">attach</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#attach-java.io.File-">attach</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#attach-java.net.URL-java.lang.String-java.lang.String-">attach</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#attach-java.net.URL-java.lang.String-java.lang.String-java.lang.String-">attach</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#createBodyPart--">createBodyPart</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#createMimeMultipart--">createMimeMultipart</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#getContainer--">getContainer</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#getPrimaryBodyPart--">getPrimaryBodyPart</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#getSubType--">getSubType</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#init--">init</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#isBoolHasAttachments--">isBoolHasAttachments</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#isInitialized--">isInitialized</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#setBoolHasAttachments-boolean-">setBoolHasAttachments</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#setInitialized-boolean-">setInitialized</a>, <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#setSubType-java.lang.String-">setSubType</a></code></li>
- </ul>
- <ul class="blockList">
- <li class="blockList"><a name="methods.inherited.from.class.org.apache.commons.mail.Email">
- <!-- -->
- </a>
- <h3>Methods inherited from class org.apache.commons.mail.<a href="../../../../org/apache/commons/mail/Email.html" title="class in org.apache.commons.mail">Email</a></h3>
- <code><a href="../../../../org/apache/commons/mail/Email.html#addBcc-java.lang.String...-">addBcc</a>, <a href="../../../../org/apache/commons/mail/Email.html#addBcc-java.lang.String-">addBcc</a>, <a href="../../../../org/apache/commons/mail/Email.html#addBcc-java.lang.String-java.lang.String-">addBcc</a>, <a href="../../../../org/apache/commons/mail/Email.html#addBcc-java.lang.String-java.lang.String-java.lang.String-">addBcc</a>, <a href="../../../../org/apache/commons/mail/Email.html#addCc-java.lang.String...-">addCc</a>, <a href="../../../../org/apache/commons/mail/Email.html#addCc-java.lang.String-">addCc</a>, <a href="../../../../org/apache/commons/mail/Email.html#addCc-java.lang.String-java.lang.String-">addCc</a>, <a href="../../../../org/apache/commons/mail/Email.html#addCc-java.lang.String-java.lang.String-java.lang.String-">addCc</a>, <a href="../../../../org/apache/commons/mail/Email.html#addHeader-java.lang.String-java.lang.String-">addHeader</a>, <a href="../../../../org/apache/commons/mail/Email.html#addReplyTo-java.lang.String-">addReplyTo</a>, <a href="../../../../org/apache/commons/mail/Email.html#addReplyTo-java.lang.String-java.lang.String-">addReplyTo</a>, <a href="../../../../org/apache/commons/mail/Email.html#addReplyTo-java.lang.String-java.lang.String-java.lang.String-">addReplyTo</a>, <a href="../../../../org/apache/commons/mail/Email.html#addTo-java.lang.String...-">addTo</a>, <a href="../../../../org/apache/commons/mail/Email.html#addTo-java.lang.String-">addTo</a>, <a href="../../../../org/apache/commons/mail/Email.html#addTo-java.lang.String-java.lang.String-">addTo</a>, <a href="../../../../org/apache/commons/mail/Email.html#addTo-java.lang.String-java.lang.String-java.lang.String-">addTo</a>, <a href="../../../../org/apache/commons/mail/Email.html#createMimeMessage-javax.mail.Session-">createMimeMessage</a>, <a href="../../../../org/apache/commons/mail/Email.html#getBccAddresses--">getBccAddresses</a>, <a href="../../../../org/apache/commons/mail/Email.html#getBounceAddress--">getBounceAddress</a>, <a href="../../../../org/apache/commons/mail/Email.html#getCcAddresses--">getCcAddresses</a>, <a href="../../../../org/apache/commons/mail/Email.html#getFromAddress--">getFromAddress</a>, <a href="../../../../org/apache/commons/mail/Email.html#getHeader-java.lang.String-">getHeader</a>, <a href="../../../../org/apache/commons/mail/Email.html#getHeaders--">getHeaders</a>, <a href="../../../../org/apache/commons/mail/Email.html#getHostName--">getHostName</a>, <a href="../../../../org/apache/commons/mail/Email.html#getMailSession--">getMailSession</a>, <a href="../../../../org/apache/commons/mail/Email.html#getMimeMessage--">getMimeMessage</a>, <a href="../../../../org/apache/commons/mail/Email.html#getReplyToAddresses--">getReplyToAddresses</a>, <a href="../../../../org/apache/commons/mail/Email.html#getSentDate--">getSentDate</a>, <a href="../../../../org/apache/commons/mail/Email.html#getSmtpPort--">getSmtpPort</a>, <a href="../../../../org/apache/commons/mail/Email.html#getSocketConnectionTimeout--">getSocketConnectionTimeout</a>, <a href="../../../../org/apache/commons/mail/Email.html#getSocketTimeout--">getSocketTimeout</a>, <a href="../../../../org/apache/commons/mail/Email.html#getSslSmtpPort--">getSslSmtpPort</a>, <a href="../../../../org/apache/commons/mail/Email.html#getSubject--">getSubject</a>, <a href="../../../../org/apache/commons/mail/Email.html#getToAddresses--">getToAddresses</a>, <a href="../../../../org/apache/commons/mail/Email.html#isSendPartial--">isSendPartial</a>, <a href="../../../../org/apache/commons/mail/Email.html#isSSL--">isSSL</a>, <a href="../../../../org/apache/commons/mail/Email.html#isSSLCheckServerIdentity--">isSSLCheckServerIdentity</a>, <a href="../../../../org/apache/commons/mail/Email.html#isSSLOnConnect--">isSSLOnConnect</a>, <a href="../../../../org/apache/commons/mail/Email.html#isStartTLSEnabled--">isStartTLSEnabled</a>, <a href="../../../../org/apache/commons/mail/Email.html#isStartTLSRequired--">isStartTLSRequired</a>, <a href="../../../../org/apache/commons/mail/Email.html#isTLS--">isTLS</a>, <a href="../../../../org/apache/commons/mail/Email.html#send--">send</a>, <a href="../../../../org/apache/commons/mail/Email.html#sendMimeMessage--">sendMimeMessage</a>, <a href="../../../../org/apache/commons/mail/Email.html#setAuthentication-java.lang.String-java.lang.String-">setAuthentication</a>, <a href="../../../../org/apache/commons/mail/Email.html#setAuthenticator-javax.mail.Authenticator-">setAuthenticator</a>, <a href="../../../../org/apache/commons/mail/Email.html#setBcc-java.util.Collection-">setBcc</a>, <a href="../../../../org/apache/commons/mail/Email.html#setBounceAddress-java.lang.String-">setBounceAddress</a>, <a href="../../../../org/apache/commons/mail/Email.html#setCc-java.util.Collection-">setCc</a>, <a href="../../../../org/apache/commons/mail/Email.html#setCharset-java.lang.String-">setCharset</a>, <a href="../../../../org/apache/commons/mail/Email.html#setContent-javax.mail.internet.MimeMultipart-">setContent</a>, <a href="../../../../org/apache/commons/mail/Email.html#setContent-java.lang.Object-java.lang.String-">setContent</a>, <a href="../../../../org/apache/commons/mail/Email.html#setDebug-boolean-">setDebug</a>, <a href="../../../../org/apache/commons/mail/Email.html#setFrom-java.lang.String-">setFrom</a>, <a href="../../../../org/apache/commons/mail/Email.html#setFrom-java.lang.String-java.lang.String-">setFrom</a>, <a href="../../../../org/apache/commons/mail/Email.html#setFrom-java.lang.String-java.lang.String-java.lang.String-">setFrom</a>, <a href="../../../../org/apache/commons/mail/Email.html#setHeaders-java.util.Map-">setHeaders</a>, <a href="../../../../org/apache/commons/mail/Email.html#setHostName-java.lang.String-">setHostName</a>, <a href="../../../../org/apache/commons/mail/Email.html#setMailSession-javax.mail.Session-">setMailSession</a>, <a href="../../../../org/apache/commons/mail/Email.html#setMailSessionFromJNDI-java.lang.String-">setMailSessionFromJNDI</a>, <a href="../../../../org/apache/commons/mail/Email.html#setPopBeforeSmtp-boolean-java.lang.String-java.lang.String-java.lang.String-">setPopBeforeSmtp</a>, <a href="../../../../org/apache/commons/mail/Email.html#setReplyTo-java.util.Collection-">setReplyTo</a>, <a href="../../../../org/apache/commons/mail/Email.html#setSendPartial-boolean-">setSendPartial</a>, <a href="../../../../org/apache/commons/mail/Email.html#setSentDate-java.util.Date-">setSentDate</a>, <a href="../../../../org/apache/commons/mail/Email.html#setSmtpPort-int-">setSmtpPort</a>, <a href="../../../../org/apache/commons/mail/Email.html#setSocketConnectionTimeout-int-">setSocketConnectionTimeout</a>, <a href="../../../../org/apache/commons/mail/Email.html#setSocketTimeout-int-">setSocketTimeout</a>, <a href="../../../../org/apache/commons/mail/Email.html#setSSL-boolean-">setSSL</a>, <a href="../../../../org/apache/commons/mail/Email.html#setSSLCheckServerIdentity-boolean-">setSSLCheckServerIdentity</a>, <a href="../../../../org/apache/commons/mail/Email.html#setSSLOnConnect-boolean-">setSSLOnConnect</a>, <a href="../../../../org/apache/commons/mail/Email.html#setSslSmtpPort-java.lang.String-">setSslSmtpPort</a>, <a href="../../../../org/apache/commons/mail/Email.html#setStartTLSEnabled-boolean-">setStartTLSEnabled</a>, <a href="../../../../org/apache/commons/mail/Email.html#setStartTLSRequired-boolean-">setStartTLSRequired</a>, <a href="../../../../org/apache/commons/mail/Email.html#setSubject-java.lang.String-">setSubject</a>, <a href="../../../../org/apache/commons/mail/Email.html#setTLS-boolean-">setTLS</a>, <a href="../../../../org/apache/commons/mail/Email.html#setTo-java.util.Collection-">setTo</a>, <a href="../../../../org/apache/commons/mail/Email.html#toInternetAddressArray-java.util.List-">toInternetAddressArray</a>, <a href="../../../../org/apache/commons/mail/Email.html#updateContentType-java.lang.String-">updateContentType</a></code></li>
- </ul>
- <ul class="blockList">
- <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
- <!-- -->
- </a>
- <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
- <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- <div class="details">
- <ul class="blockList">
- <li class="blockList">
- <!-- ============ FIELD DETAIL =========== -->
- <ul class="blockList">
- <li class="blockList"><a name="field.detail">
- <!-- -->
- </a>
- <h3>Field Detail</h3>
- <a name="CID_LENGTH">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>CID_LENGTH</h4>
- <pre>public static final int CID_LENGTH</pre>
- <div class="block">Definition of the length of generated CID's.</div>
- <dl>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../../../constant-values.html#org.apache.commons.mail.HtmlEmail.CID_LENGTH">Constant Field Values</a></dd>
- </dl>
- </li>
- </ul>
- <a name="text">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>text</h4>
- <pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> text</pre>
- <div class="block">Text part of the message. This will be used as alternative text if
- the email client does not support HTML messages.</div>
- </li>
- </ul>
- <a name="html">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>html</h4>
- <pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> html</pre>
- <div class="block">Html part of the message.</div>
- </li>
- </ul>
- <a name="inlineImages">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>inlineImages</h4>
- <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
- protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><org.apache.commons.mail.HtmlEmail.InlineImage> inlineImages</pre>
- <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">As of commons-email 1.1, no longer used. Inline embedded
- objects are now stored in <a href="../../../../org/apache/commons/mail/HtmlEmail.html#inlineEmbeds"><code>inlineEmbeds</code></a>.</span></div>
- </li>
- </ul>
- <a name="inlineEmbeds">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>inlineEmbeds</h4>
- <pre>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,org.apache.commons.mail.HtmlEmail.InlineImage> inlineEmbeds</pre>
- <div class="block">Embedded images Map<String, InlineImage> where the key is the
- user-defined image name.</div>
- </li>
- </ul>
- </li>
- </ul>
- <!-- ========= CONSTRUCTOR DETAIL ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="constructor.detail">
- <!-- -->
- </a>
- <h3>Constructor Detail</h3>
- <a name="HtmlEmail--">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>HtmlEmail</h4>
- <pre>public HtmlEmail()</pre>
- </li>
- </ul>
- </li>
- </ul>
- <!-- ============ METHOD DETAIL ========== -->
- <ul class="blockList">
- <li class="blockList"><a name="method.detail">
- <!-- -->
- </a>
- <h3>Method Detail</h3>
- <a name="setTextMsg-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setTextMsg</h4>
- <pre>public <a href="../../../../org/apache/commons/mail/HtmlEmail.html" title="class in org.apache.commons.mail">HtmlEmail</a> setTextMsg(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> aText)
- throws <a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></pre>
- <div class="block">Set the text content.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>aText</code> - A String.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>An HtmlEmail.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></code> - see javax.mail.internet.MimeBodyPart
- for definitions</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.0</dd>
- </dl>
- </li>
- </ul>
- <a name="setHtmlMsg-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setHtmlMsg</h4>
- <pre>public <a href="../../../../org/apache/commons/mail/HtmlEmail.html" title="class in org.apache.commons.mail">HtmlEmail</a> setHtmlMsg(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> aHtml)
- throws <a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></pre>
- <div class="block">Set the HTML content.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>aHtml</code> - A String.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>An HtmlEmail.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></code> - see javax.mail.internet.MimeBodyPart
- for definitions</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.0</dd>
- </dl>
- </li>
- </ul>
- <a name="setMsg-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setMsg</h4>
- <pre>public <a href="../../../../org/apache/commons/mail/Email.html" title="class in org.apache.commons.mail">Email</a> setMsg(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> msg)
- throws <a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></pre>
- <div class="block">Set the message.
- <p>This method overrides <a href="../../../../org/apache/commons/mail/MultiPartEmail.html#setMsg-java.lang.String-"><code>MultiPartEmail.setMsg(String)</code></a> in
- order to send an HTML message instead of a plain text message in
- the mail body. The message is formatted in HTML for the HTML
- part of the message; it is left as is in the alternate text
- part.</div>
- <dl>
- <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/mail/MultiPartEmail.html#setMsg-java.lang.String-">setMsg</a></code> in class <code><a href="../../../../org/apache/commons/mail/MultiPartEmail.html" title="class in org.apache.commons.mail">MultiPartEmail</a></code></dd>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>msg</code> - the message text to use</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>this <code>HtmlEmail</code></dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></code> - if msg is null or empty;
- see javax.mail.internet.MimeBodyPart for definitions</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.0</dd>
- </dl>
- </li>
- </ul>
- <a name="embed-java.lang.String-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>embed</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> embed(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> urlString,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)
- throws <a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></pre>
- <div class="block">Attempts to parse the specified <code>String</code> as a URL that will
- then be embedded in the message.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>urlString</code> - String representation of the URL.</dd>
- <dd><code>name</code> - The name that will be set in the filename header field.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>A String with the Content-ID of the URL.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></code> - when URL supplied is invalid or if <code>name</code> is null
- or empty; also see <a href="http://docs.oracle.com/javaee/6/api/javax/mail/internet/MimeBodyPart.html?is-external=true" title="class or interface in javax.mail.internet"><code>MimeBodyPart</code></a> for definitions</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.1</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../../../org/apache/commons/mail/HtmlEmail.html#embed-java.net.URL-java.lang.String-"><code>embed(URL, String)</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="embed-java.net.URL-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>embed</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> embed(<a href="http://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a> url,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)
- throws <a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></pre>
- <div class="block">Embeds an URL in the HTML.
- <p>This method embeds 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. It is an error to bind the same name
- to more than one URL; if the same URL is embedded multiple times, the
- same Content-ID is guaranteed to be returned.
- <p>While functionally the same as passing <code>URLDataSource</code> to
- <a href="../../../../org/apache/commons/mail/HtmlEmail.html#embed-javax.activation.DataSource-java.lang.String-java.lang.String-"><code>embed(DataSource, String, String)</code></a>, this method attempts
- to validate the URL before embedding it in the message and will throw
- <code>EmailException</code> if the validation fails. In this case, the
- <code>HtmlEmail</code> object will not be changed.
- <p>
- NOTE: Clients should take care to ensure that different URLs are bound to
- different names. This implementation tries to detect this and throw
- <code>EmailException</code>. However, it is not guaranteed to catch
- all cases, especially when the URL refers to a remote HTTP host that
- may be part of a virtual host cluster.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>url</code> - The URL of the file.</dd>
- <dd><code>name</code> - The name that will be set in the filename header
- field.</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>A String with the Content-ID of the file.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></code> - when URL supplied is invalid or if <code>name</code> is null
- or empty; also see <a href="http://docs.oracle.com/javaee/6/api/javax/mail/internet/MimeBodyPart.html?is-external=true" title="class or interface in javax.mail.internet"><code>MimeBodyPart</code></a> for definitions</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.0</dd>
- </dl>
- </li>
- </ul>
- <a name="embed-java.io.File-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>embed</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> embed(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file)
- throws <a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></pre>
- <div class="block">Embeds a file in the HTML. This implementation delegates to
- <a href="../../../../org/apache/commons/mail/HtmlEmail.html#embed-java.io.File-java.lang.String-"><code>embed(File, String)</code></a>.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>file</code> - The <code>File</code> object to embed</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>A String with the Content-ID of the file.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></code> - when the supplied <code>File</code> cannot be
- used; also see <a href="http://docs.oracle.com/javaee/6/api/javax/mail/internet/MimeBodyPart.html?is-external=true" title="class or interface in javax.mail.internet"><code>MimeBodyPart</code></a> for definitions</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.1</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../../../org/apache/commons/mail/HtmlEmail.html#embed-java.io.File-java.lang.String-"><code>embed(File, String)</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="embed-java.io.File-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>embed</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> embed(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> cid)
- throws <a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></pre>
- <div class="block">Embeds a file in the HTML.
- <p>This method embeds 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. Files are bound to their names, which is
- the value returned by <a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true#getName--" title="class or interface in java.io"><code>File.getName()</code></a>. If the same file
- is embedded multiple times, the same CID is guaranteed to be returned.
- <p>While functionally the same as passing <code>FileDataSource</code> to
- <a href="../../../../org/apache/commons/mail/HtmlEmail.html#embed-javax.activation.DataSource-java.lang.String-java.lang.String-"><code>embed(DataSource, String, String)</code></a>, this method attempts
- to validate the file before embedding it in the message and will throw
- <code>EmailException</code> if the validation fails. In this case, the
- <code>HtmlEmail</code> object will not be changed.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>file</code> - The <code>File</code> to embed</dd>
- <dd><code>cid</code> - the Content-ID to use for the embedded <code>File</code></dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>A String with the Content-ID of the file.</dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></code> - when the supplied <code>File</code> cannot be used
- or if the file has already been embedded;
- also see <a href="http://docs.oracle.com/javaee/6/api/javax/mail/internet/MimeBodyPart.html?is-external=true" title="class or interface in javax.mail.internet"><code>MimeBodyPart</code></a> for definitions</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.1</dd>
- </dl>
- </li>
- </ul>
- <a name="embed-javax.activation.DataSource-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>embed</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> embed(<a href="http://docs.oracle.com/javase/7/docs/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation">DataSource</a> dataSource,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)
- throws <a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></pre>
- <div class="block">Embeds the specified <code>DataSource</code> in the HTML using a
- randomly generated Content-ID. Returns the generated Content-ID string.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>dataSource</code> - the <code>DataSource</code> to embed</dd>
- <dd><code>name</code> - the name that will be set in the filename header field</dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the generated Content-ID for this <code>DataSource</code></dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></code> - if the embedding fails or if <code>name</code> is
- null or empty</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.1</dd>
- <dt><span class="seeLabel">See Also:</span></dt>
- <dd><a href="../../../../org/apache/commons/mail/HtmlEmail.html#embed-javax.activation.DataSource-java.lang.String-java.lang.String-"><code>embed(DataSource, String, String)</code></a></dd>
- </dl>
- </li>
- </ul>
- <a name="embed-javax.activation.DataSource-java.lang.String-java.lang.String-">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>embed</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> embed(<a href="http://docs.oracle.com/javase/7/docs/api/javax/activation/DataSource.html?is-external=true" title="class or interface in javax.activation">DataSource</a> dataSource,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> cid)
- throws <a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></pre>
- <div class="block">Embeds the specified <code>DataSource</code> in the HTML using the
- specified Content-ID. Returns the specified Content-ID string.</div>
- <dl>
- <dt><span class="paramLabel">Parameters:</span></dt>
- <dd><code>dataSource</code> - the <code>DataSource</code> to embed</dd>
- <dd><code>name</code> - the name that will be set in the filename header field</dd>
- <dd><code>cid</code> - the Content-ID to use for this <code>DataSource</code></dd>
- <dt><span class="returnLabel">Returns:</span></dt>
- <dd>the URL encoded Content-ID for this <code>DataSource</code></dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></code> - if the embedding fails or if <code>name</code> is
- null or empty</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.1</dd>
- </dl>
- </li>
- </ul>
- <a name="buildMimeMessage--">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>buildMimeMessage</h4>
- <pre>public void buildMimeMessage()
- throws <a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></pre>
- <div class="block">Does the work of actually building the MimeMessage. Please note that
- a user rarely calls this method directly and only if he/she is
- interested in the sending the underlying MimeMessage without
- commons-email.</div>
- <dl>
- <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/mail/MultiPartEmail.html#buildMimeMessage--">buildMimeMessage</a></code> in class <code><a href="../../../../org/apache/commons/mail/MultiPartEmail.html" title="class in org.apache.commons.mail">MultiPartEmail</a></code></dd>
- <dt><span class="throwsLabel">Throws:</span></dt>
- <dd><code><a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail">EmailException</a></code> - if there was an error.</dd>
- <dt><span class="simpleTagLabel">Since:</span></dt>
- <dd>1.0</dd>
- </dl>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
- <!-- ========= END OF CLASS DATA ========= -->
- <!-- ======= START OF BOTTOM NAVBAR ====== -->
- <div class="bottomNav"><a name="navbar.bottom">
- <!-- -->
- </a>
- <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
- <a name="navbar.bottom.firstrow">
- <!-- -->
- </a>
- <ul class="navList" title="Navigation">
- <li><a href="../../../../overview-summary.html">Overview</a></li>
- <li><a href="package-summary.html">Package</a></li>
- <li class="navBarCell1Rev">Class</li>
- <li><a href="class-use/HtmlEmail.html">Use</a></li>
- <li><a href="package-tree.html">Tree</a></li>
- <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
- <li><a href="../../../../index-all.html">Index</a></li>
- <li><a href="../../../../help-doc.html">Help</a></li>
- </ul>
- </div>
- <div class="subNav">
- <ul class="navList">
- <li><a href="../../../../org/apache/commons/mail/EmailException.html" title="class in org.apache.commons.mail"><span class="typeNameLink">Prev Class</span></a></li>
- <li><a href="../../../../org/apache/commons/mail/ImageHtmlEmail.html" title="class in org.apache.commons.mail"><span class="typeNameLink">Next Class</span></a></li>
- </ul>
- <ul class="navList">
- <li><a href="../../../../index.html?org/apache/commons/mail/HtmlEmail.html" target="_top">Frames</a></li>
- <li><a href="HtmlEmail.html" target="_top">No Frames</a></li>
- </ul>
- <ul class="navList" id="allclasses_navbar_bottom">
- <li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
- </ul>
- <div>
- <script type="text/javascript"><!--
- allClassesLink = document.getElementById("allclasses_navbar_bottom");
- if(window==top) {
- allClassesLink.style.display = "block";
- }
- else {
- allClassesLink.style.display = "none";
- }
- //-->
- </script>
- </div>
- <div>
- <ul class="subNavList">
- <li>Summary: </li>
- <li>Nested | </li>
- <li><a href="#field.summary">Field</a> | </li>
- <li><a href="#constructor.summary">Constr</a> | </li>
- <li><a href="#method.summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li><a href="#field.detail">Field</a> | </li>
- <li><a href="#constructor.detail">Constr</a> | </li>
- <li><a href="#method.detail">Method</a></li>
- </ul>
- </div>
- <a name="skip.navbar.bottom">
- <!-- -->
- </a></div>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
- <p class="legalCopy"><small>Copyright © 2001–2017 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
- </body>
- </html>
|