Skip to main content

send

Function send 

Source
pub fn send(cfg: &SmtpConfig, mail: &OutgoingMail) -> Result<(), String>
Expand description

Send mail through the SMTP submission server described by cfg (STARTTLS).

Builds a plain-text lettre::Message, opens a pooled STARTTLS relay to cfg.host:cfg.port authenticating with cfg.username / cfg.password, and submits the message. All underlying errors (address parse, transport build, send) are flattened to String.