deliver

Function deliver 

Source
pub async fn deliver(email: &Email) -> Result<DeliveryResult, MailError>
Expand description

Deliver an email using the global mailer.

Auto-configures from environment variables on first call. Validates required fields (from, to) before sending. Adds default from address from EMAIL_FROM if not set on email.

use missive::{Email, deliver};

let email = Email::new()
    .to("user@example.com")
    .subject("Hello!")
    .text_body("Hi there");

deliver(&email).await?;