pub enum MailError {
Show 16 variants
NotConfigured,
Configuration(String),
MissingField(&'static str),
InvalidAddress(String),
AttachmentError(String),
AttachmentMissingContent(String),
AttachmentFileNotFound(String),
AttachmentReadError(String),
BuildError(String),
SendError(String),
UnsupportedFeature(String),
ProviderError {
provider: &'static str,
message: String,
status: Option<u16>,
},
HttpError(String),
JsonError(String),
TemplateError(String),
Internal(String),
}Expand description
Errors that can occur when sending emails.
Variants§
NotConfigured
Email provider is not configured.
Configuration(String)
Configuration error (missing env var, invalid value, etc.)
MissingField(&'static str)
Missing required field (e.g., from address).
InvalidAddress(String)
Invalid email address format.
AttachmentError(String)
Error reading or processing attachment (generic).
AttachmentMissingContent(String)
Attachment has no content (neither data nor path provided).
AttachmentFileNotFound(String)
Attachment file not found.
AttachmentReadError(String)
Failed to read attachment file.
BuildError(String)
Error building the email message.
SendError(String)
Error sending the email.
UnsupportedFeature(String)
Unsupported feature for this adapter.
ProviderError
Provider-specific error with details.
HttpError(String)
HTTP request failed.
JsonError(String)
JSON serialization/deserialization error.
TemplateError(String)
Template rendering error.
Internal(String)
Generic internal error.
Implementations§
Trait Implementations§
Source§impl Error for MailError
impl Error for MailError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for MailError
impl RefUnwindSafe for MailError
impl Send for MailError
impl Sync for MailError
impl Unpin for MailError
impl UnwindSafe for MailError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more