-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'from' support to MessageCreateOptions
- Loading branch information
1 parent
cd41fb6
commit f07b38e
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,13 @@ public class MessageCreateOptions { | |
@Key | ||
private String to; | ||
|
||
/** | ||
* Allows for the partial override of the message's 'from' address. This **must** be | ||
* an address ending with `YOUR_SERVER.mailosaur.net`, such as `[email protected]`. | ||
*/ | ||
@Key | ||
private String from; | ||
|
||
/** | ||
* If true, email will be sent upon creation. | ||
*/ | ||
|
@@ -55,6 +62,18 @@ public MessageCreateOptions withTo(String to) { | |
return this; | ||
} | ||
|
||
/** | ||
* Partially overrides of the message's 'from' address. This **must** be an address ending | ||
* with `YOUR_SERVER.mailosaur.net`, such as `[email protected]`. | ||
* | ||
* @param from The email address. | ||
* @return the MessageCreateOptions object itself. | ||
*/ | ||
public MessageCreateOptions withFrom(String from) { | ||
this.from = from; | ||
return this; | ||
} | ||
|
||
/** | ||
* Sets whether the email should be sent upon creation. | ||
* | ||
|