Package dev.gmitch215.bytebox
Interface MailMessage
- All Superinterfaces:
org.teavm.jso.JSObject
public interface MailMessage
extends org.teavm.jso.JSObject
Cloudflare's
ForwardableEmailMessage.
InboundMail is what a handler sees. This is the JavaScript object behind it, and it is
the surface to reach for when something about a message is not exposed there.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionorg.teavm.jso.core.JSPromise<org.teavm.jso.JSObject> Sends the message on to a verified destination address.getFrom()Returns the envelope sender.Returns the message headers.org.teavm.jso.JSObjectgetRaw()Returns the raw MIME message, as a stream.intReturns the size of the raw message in bytes.getTo()Returns the envelope recipient.org.teavm.jso.core.JSPromise<org.teavm.jso.JSObject> reply(org.teavm.jso.JSObject message) Answers the message in the same SMTP session.voidRefuses the message with a permanent SMTP error.Methods inherited from interface org.teavm.jso.JSObject
cast
-
Method Details
-
getFrom
String getFrom()Returns the envelope sender.- Returns:
- the envelope sender
-
getTo
String getTo()Returns the envelope recipient.- Returns:
- the envelope recipient
-
getHeaders
Headers getHeaders()Returns the message headers.- Returns:
- the message headers
-
getRaw
org.teavm.jso.JSObject getRaw()Returns the raw MIME message, as a stream.- Returns:
- the raw MIME message, as a stream
-
getRawSize
int getRawSize()Returns the size of the raw message in bytes.- Returns:
- the size of the raw message in bytes
-
setReject
Refuses the message with a permanent SMTP error.- Parameters:
reason- returned to the sending server
-
forward
Sends the message on to a verified destination address.- Parameters:
address- the destination- Returns:
- settles once Cloudflare has accepted the forward
-
reply
org.teavm.jso.core.JSPromise<org.teavm.jso.JSObject> reply(org.teavm.jso.JSObject message) Answers the message in the same SMTP session.- Parameters:
message- the reply- Returns:
- settles once Cloudflare has accepted the reply
-