Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
KeenenCharles committed Dec 7, 2016
1 parent 4f1cd6b commit 891c006
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ a small library to send a email in background withou user interaction
.withUsername("username@gmail.com")
.withPassword("password12345")
.withMailto("toemail@gmail.com")
.withType(BackgroundMail.TYPE_PLAIN)
.withSubject("this is the subject")
.withBody("this is the body")
.withOnSuccessCallback(new BackgroundMail.OnSuccessCallback() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public class BackgroundMail {
private OnSuccessCallback onSuccessCallback;
private OnFailCallback onFailCallback;

public final static String TYPE_PLAIN = "text/plain";
public final static String TYPE_HTML = "text/html";

public interface OnSuccessCallback {
void onSuccess();
}
Expand Down Expand Up @@ -323,7 +326,7 @@ public static final class Builder {
private String mailto;
private String subject;
private String body;
private String type = "text/plain";
private String type = BackgroundMail.TYPE_PLAIN;
private ArrayList<String> attachments = new ArrayList<>();
private String sendingMessage;
private String sendingMessageSuccess;
Expand Down Expand Up @@ -379,6 +382,7 @@ public Builder withSubject(@StringRes int subjectRes) {
return this;
}

//set email mime type
public Builder withType(@NonNull String type) {
this.type = type;
return this;
Expand Down

0 comments on commit 891c006

Please sign in to comment.