Skip to content

Commit b87402d

Browse files
committed
#108: updated documentation with example of how to get the generated ID after sending
1 parent 5727f43 commit b87402d

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

src/main/webapp/src/app/components/features/features.html

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ <h1>Simple Java Mail Features</h1>
2525
<li><a simplePageScroll href="#section-sending-asynchronously" class="indent">Asynchronous parallel batch sending</a></li>
2626
<li><a simplePageScroll href="#section-custom-session">Sending with your own Session instance</a></li>
2727
<li><a simplePageScroll href="#section-custom-id">Setting a custom message ID on sent email</a></li>
28+
<li><a simplePageScroll href="#section-sent-id">Getting the generated email id after sending</a></li>
2829
<li><a simplePageScroll href="#section-ssl-tls">Sending with SSL and TLS</a></li>
2930
<li><a simplePageScroll href="#section-gmail" class="indent">SSL and TLS with Google mail</a></li>
3031
<li><a simplePageScroll href="#section-attachments">Adding attachments</a></li>
@@ -234,7 +235,7 @@ <h2>Setting a custom message ID on sent email</h2>
234235

235236
<div class="side">
236237
<pre><code>Email email = new Email()
237-
email.setId("<123@456>");
238+
email.setId("<123@456>");
238239
</code></pre>
239240
Or:
240241
<pre><code>Email email = new EmailBuilder()
@@ -245,6 +246,26 @@ <h2>Setting a custom message ID on sent email</h2>
245246
</section>
246247

247248

249+
<a href="#section-sent-id" id="section-sent-id" class="section-link h2">&sect;</a>
250+
<h2>Getting the generated email id after sending</h2>
251+
252+
<section>
253+
<div class="view">
254+
<p>
255+
Sometimes you need the actual ID used in the MimeMessage that went out to the SMTP server.
256+
Luckily, it's very easy to retrieve it.
257+
</p>
258+
</div>
259+
260+
<div class="side">
261+
<pre><code>
262+
mailer.sendMail(email); // id updated during sending!
263+
email.getId(); // <1420232606.6.1509560747190@Cypher>
264+
</code></pre>
265+
</div>
266+
</section>
267+
268+
248269
<a href="#section-ssl-tls" id="section-ssl-tls" class="section-link h2">&sect;</a>
249270
<h2>Sending with SSL and TLS</h2>
250271

@@ -410,7 +431,7 @@ <h2>Direct access to the internal Session</h2>
410431
</section>
411432

412433

413-
<a href="#section-dkim" id="section-dkim" class="section-link h2">&sect;</a>
434+
<a href="#section-dkim" id="section-return-receipt" class="section-link h2">&sect;</a>
414435
<h2>Signing emails with DKIM</h2>
415436

416437
<section>

0 commit comments

Comments
 (0)