Skip to content

Commit 8965430

Browse files
committed
Clarified documentation
1 parent 0e06142 commit 8965430

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

modules/simple-java-mail/src/main/java/org/simplejavamail/email/internal/InternalEmail.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public InternalEmail(@NotNull EmailPopulatingBuilder builder) {
2525

2626
/**
2727
* @deprecated Don't use this method. This method is used internally to set the reference to the original email when a copy is made to which all defaults and overrides
28-
* are applied. When sending the email, however, we still need a reference to the original email to be able to update the message id.
28+
* are applied. When sending the email, however, we still need a reference to the original email to be able to update the message id. userProvidedEmail can be set to
29+
* null in some junit tests.
2930
*/
3031
public void setUserProvidedEmail(@NotNull final Email userProvidedEmail) {
3132
this.userProvidedEmail = (InternalEmail) userProvidedEmail;
@@ -50,4 +51,5 @@ public void updateId(@NotNull final String id) {
5051
public boolean wasMergedWithSmimeSignedMessage() {
5152
return wasMergedWithSmimeSignedMessage;
5253
}
54+
5355
}

modules/simple-java-mail/src/main/java/org/simplejavamail/mailer/internal/EmailGovernanceImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ public EmailWithDefaultsAndOverridesApplied produceEmailApplyingDefaultsAndOverr
232232
builder.fixingMessageId(resolveEmailProperty(provided, EmailProperty.ID));
233233

234234
val email = builder.buildEmail();
235+
236+
// we need to update the user's email instance with the generated ID when sending
235237
if (provided != null) {
236238
//noinspection deprecation
237239
((InternalEmail) email).setUserProvidedEmail(provided);

0 commit comments

Comments
 (0)