public class MJEasyEmail extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
MJEasyEmail(MJEasyClient client,
MailjetRequest request) |
| Modifier and Type | Method and Description |
|---|---|
MJEasyEmail |
customId(String customId)
Set the customID
|
MJEasyEmail |
from(String email)
Set the sender
|
MJEasyEmail |
from(String email,
String name)
Set the sender
|
MailjetRequest |
getRequest()
Get the internal MailjetRequest wrapped by the MJEasyEmail object
|
MJEasyEmail |
html(String html)
Set the HTML content of the message
|
MailjetResponse |
send()
Send the email
|
MJEasyEmail |
subject(String subject)
Set the subject
|
MJEasyEmail |
text(String text)
Set the text content of the message
|
MJEasyEmail |
to(String email)
Add a recipient
|
protected MJEasyEmail(MJEasyClient client, MailjetRequest request)
public MJEasyEmail from(String email, String name)
email - Email address of the sendername - Name of the senderpublic MJEasyEmail from(String email)
email - Email address of the senderpublic MJEasyEmail to(String email)
email - Email of the recipientpublic MJEasyEmail subject(String subject)
subject - Subject of the emailpublic MJEasyEmail text(String text)
text - Text contentpublic MJEasyEmail html(String html)
html - HTML contentpublic MJEasyEmail customId(String customId)
customId - CustomIDpublic MailjetResponse send() throws MailjetException, MailjetSocketTimeoutException
MailjetExceptionMailjetSocketTimeoutExceptionpublic MailjetRequest getRequest()
Copyright © 2017. All rights reserved.