Class Mail.Builder
java.lang.Object
com.codename1.backend.mail.Mail.Builder
- Enclosing class:
Mail
-
Method Summary
Modifier and TypeMethodDescriptionAttaches a file.Adds recipients no other recipient is told about.build()Checks everything and answers the mail, or throws IllegalArgumentException naming what is wrong.Adds recipients every other recipient can see were copied.The sender.Adds a header of the application's own, such asList-UnsubscribeorX-Campaign.The HTML body.Embeds an image the HTML body shows with<img src="cid:contentId">.Where a reply goes when that is not the sender.The subject line; any language, one line.The HTML body, rendered from the templatetemplates/<view>.htmlwithmodelwhen the mail is sent.The plain text body.Adds recipients.
-
Method Details
-
from
The sender. Without one the mail is sent fromcn1.mail.from. -
replyTo
Where a reply goes when that is not the sender. -
to
Adds recipients. -
cc
Adds recipients every other recipient can see were copied. -
bcc
Adds recipients no other recipient is told about. -
subject
The subject line; any language, one line. -
text
The plain text body. -
html
The HTML body. -
template
The HTML body, rendered from the templatetemplates/<view>.htmlwithmodelwhen the mail is sent. The text body is derived from what was rendered, unlesstextgave one. -
attach
Attaches a file.
name: the file name the reader seestype: its media type, such asapplication/pdf; null forapplication/octet-streamdata: its content, which the mail keeps and does not copy
-
inline
Embeds an image the HTML body shows with<img src="cid:contentId">. -
header
Adds a header of the application's own, such asList-UnsubscribeorX-Campaign. The headers a mail is built from -- the addresses, the subject, the date, the content headers -- cannot be set here. -
build
Checks everything and answers the mail, or throws IllegalArgumentException naming what is wrong.
-