moonbit-community/email/transport does not have a README file
pub suberror SmtpClientError {
TransportClosed
BusyTransport
Timeout(SmtpPhase, Int)
ConnectionFailure(SmtpPhase, String)
InvalidResponse(String)
UnexpectedStatus(Int, Int, String)
ServiceRejected(SmtpPhase, Int, String, FailureClass)
MissingExtension(String)
MissingAuthMechanism(SmtpAuthMechanism)
AuthFailed(String)
ProtocolError(String)
} derive(Eq, Debug)fn DeliveryOutcome::all_accepted(recipients : Array[Mailbox], response? : String) -> DeliveryOutcomefn DeliveryOutcome::partial(accepted : Array[Mailbox], rejected : Array[Mailbox], unsent : Array[Mailbox], response : String) -> DeliveryOutcomefn FakeTransport::send(self : FakeTransport, envelope : Envelope, encoded_message : String) -> Result[DeliveryOutcome, TransportError]fn FakeTransport::send_message(self : FakeTransport, envelope : Envelope, message : Message) -> Result[DeliveryOutcome, TransportError]pub struct FileTransport {
root_dir : String
artifacts : Array[FileArtifact]
next_index : Int
closed : Bool
} derive(Debug)async fn FileTransport::send(self : FileTransport, envelope : Envelope, encoded_message : String) -> Result[DeliveryOutcome, TransportError]async fn FileTransport::send_message(self : FileTransport, envelope : Envelope, message : Message) -> Result[DeliveryOutcome, TransportError]pub struct SmtpCapabilities {
raw_lines : Array[String]
auth_mechanisms : Array[SmtpAuthMechanism]
supports_starttls : Bool
supports_pipelining : Bool
supports_8bitmime : Bool
max_message_size : Int?
} derive(Eq, Debug)pub struct SmtpConfig {
host : String
port : Int
hello_name : String
security : SmtpSecurity
auth : SmtpAuth
tls_trust : SmtpTlsTrust
timeouts : SmtpTimeouts
retry_policy : SmtpRetryPolicy
reuse_connection : Bool
} derive(Eq, Debug)fn SmtpConfig::new(host : String, port : Int, hello_name? : String, security? : SmtpSecurity, auth? : SmtpAuth, tls_trust? : SmtpTlsTrust, timeouts? : SmtpTimeouts, retry_policy? : SmtpRetryPolicy, reuse_connection? : Bool) -> SmtpConfigfn SmtpRetryPolicy::new(max_retries? : Int, retry_delay_ms? : Int, retry_on_connection_failure? : Bool, retry_on_timeout? : Bool, retry_on_transient_failure? : Bool) -> SmtpRetryPolicyfn SmtpTimeouts::new(connect_ms? : Int, greeting_ms? : Int, command_ms? : Int, data_ms? : Int, idle_ms? : Int) -> SmtpTimeoutspub struct SmtpTransport {
// private fields
}async fn SmtpTransport::send(self : SmtpTransport, envelope : Envelope, encoded_message : String) -> DeliveryOutcomeasync fn SmtpTransport::send_message(self : SmtpTransport, envelope : Envelope, message : Message) -> DeliveryOutcomepub struct StubSmtpTransport {
pool_size : Int
planned_outcomes : Array[DeliveryOutcome]
next_plan_index : Int
attempts : Array[SmtpAttempt]
send_count : Int
closed : Bool
} derive(Debug)fn StubSmtpTransport::new(pool_size? : Int, planned_outcomes? : Array[DeliveryOutcome]) -> StubSmtpTransportfn StubSmtpTransport::send(self : StubSmtpTransport, envelope : Envelope, encoded_message : String) -> Result[DeliveryOutcome, TransportError]fn StubSmtpTransport::send_message(self : StubSmtpTransport, envelope : Envelope, message : Message) -> Result[DeliveryOutcome, TransportError]Install
Download zipA MoonBit email library with facade APIs for composing, encoding, and sending messages over SMTP.