@@ -202,22 +202,26 @@ private void configureSessionWithTimeout(@Nonnull final Session session, final i
202
202
203
203
/**
204
204
* Separate closure that can be executed directly or from a thread. Refer to {@link #send(Email, boolean)} for details.
205
+ * <p>
206
+ * Note that this Runnable implementation is <strong>not</strong> thread related, it is just to encapsulate the code to
207
+ * be run directly or from a <em>real</em> Runnable.
205
208
*/
206
209
private class SendMailClosure implements Runnable {
207
210
208
211
@ Nonnull final Session session ;
209
212
@ Nonnull final Email email ;
210
- private final boolean async ;
213
+ private final boolean asyncForLoggingPurpose ;
214
+
211
215
212
216
/**
213
217
* @param session The session with which to produce the {@link MimeMessage} aquire the {@link Transport} for connections.
214
218
* @param email The email that will be converted into a {@link MimeMessage}.
215
- * @param async For logging purposes, indicates whether this closure is running in async mode.
219
+ * @param asyncForLoggingPurpose For logging purposes, indicates whether this closure is running in async mode.
216
220
*/
217
- private SendMailClosure (@ Nonnull Session session , @ Nonnull Email email , boolean async ) {
221
+ private SendMailClosure (@ Nonnull Session session , @ Nonnull Email email , boolean asyncForLoggingPurpose ) {
218
222
this .session = session ;
219
223
this .email = email ;
220
- this .async = async ;
224
+ this .asyncForLoggingPurpose = asyncForLoggingPurpose ;
221
225
}
222
226
223
227
@ SuppressWarnings ("deprecation" )
@@ -230,7 +234,7 @@ public void run() {
230
234
231
235
configureBounceToAddress (session , email );
232
236
233
- logSession (session , async , "mail" );
237
+ logSession (session , asyncForLoggingPurpose , "mail" );
234
238
message .saveChanges (); // some headers and id's will be set for this specific message
235
239
email .internalSetId (message .getMessageID ());
236
240
0 commit comments