Package dev.gmitch215.bytebox.binding
Interface EmailSender
- All Superinterfaces:
org.teavm.jso.JSObject
public interface EmailSender
extends org.teavm.jso.JSObject
An email sending binding. Declared with
email(), named EMAIL by default.
Separate from the Mail handler: that receives, this sends. The
destination has to be verified in the Cloudflare dashboard, and the sending domain has to be one
the account controls.
SMTP is not an alternative. Cloudflare's own relay sits on a Cloudflare IP, and
cloudflare:sockets refuses to connect to those, so a Worker cannot SMTP to Cloudflare
Email Sending even with valid credentials. This binding and the REST API are the two ways out.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidSends a message.default voidSends a plain-text message, assembling the MIME.org.teavm.jso.core.JSPromise<org.teavm.jso.JSObject> sendMessage(org.teavm.jso.JSObject message) Methods inherited from interface org.teavm.jso.JSObject
cast
-
Method Details
-
send
Sends a message.- Parameters:
from- the sender, on a domain the account controlsto- the recipient, verified in the dashboardmime- the message as raw MIME
-
send
Sends a plain-text message, assembling the MIME.- Parameters:
from- the senderto- the recipientsubject- the subjectbody- the body
-
sendMessage
org.teavm.jso.core.JSPromise<org.teavm.jso.JSObject> sendMessage(org.teavm.jso.JSObject message)
-