Expand description
SMTP email sending and OTP verification for at-rust-go.
Provides async email delivery via SMTP and a two-step OTP verification flow for institution/organization membership verification.
When SMTP is not configured, OTPs are logged to stdout (dev mode).
Re-exports§
pub use config::EmailConfig;pub use otp::generate_otp;pub use otp::send_otp;pub use otp::verify_otp;pub use send::send_email;
Modules§
Constants§
- CREATE_
OTP_ TABLE_ POSTGRES - SQL for creating the OTP codes table (PostgreSQL).
- CREATE_
OTP_ TABLE_ SQLITE - SQL for creating the OTP codes table (SQLite).
Functions§
- validate_
domain - Validate that an email domain is in the allowed list.
Returns
Ok(())if allowed,Errwith a message if not.