pub struct SmtpEmailService { /* private fields */ }Expand description
SMTP email service
Implementations§
Source§impl SmtpEmailService
impl SmtpEmailService
Sourcepub fn new(config: SmtpConfig) -> EmailResult<Self>
pub fn new(config: SmtpConfig) -> EmailResult<Self>
Create new SMTP email service
Sourcepub fn builder() -> SmtpServiceBuilder
pub fn builder() -> SmtpServiceBuilder
Builder for SMTP email service
Trait Implementations§
Source§impl EmailService for SmtpEmailService
impl EmailService for SmtpEmailService
Source§fn send<'life0, 'async_trait>(
&'life0 self,
message: EmailMessage,
) -> Pin<Box<dyn Future<Output = EmailResult<EmailDeliveryReport>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
message: EmailMessage,
) -> Pin<Box<dyn Future<Output = EmailResult<EmailDeliveryReport>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send single email message
Source§fn send_template<'life0, 'life1, 'async_trait>(
&'life0 self,
template_name: &'life1 str,
recipients: Vec<String>,
template_data: HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = EmailResult<Vec<EmailDeliveryReport>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_template<'life0, 'life1, 'async_trait>(
&'life0 self,
template_name: &'life1 str,
recipients: Vec<String>,
template_data: HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = EmailResult<Vec<EmailDeliveryReport>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send email using template
Source§fn get_delivery_status<'life0, 'life1, 'async_trait>(
&'life0 self,
message_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = EmailResult<Option<EmailDeliveryReport>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_delivery_status<'life0, 'life1, 'async_trait>(
&'life0 self,
message_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = EmailResult<Option<EmailDeliveryReport>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get delivery status for a message
Source§fn cancel_scheduled<'life0, 'life1, 'async_trait>(
&'life0 self,
message_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = EmailResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel_scheduled<'life0, 'life1, 'async_trait>(
&'life0 self,
message_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = EmailResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Cancel scheduled email
Source§fn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EmailResult<EmailServiceStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EmailResult<EmailServiceStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get email service statistics
Source§fn validate_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EmailResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EmailResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Validate email configuration
Source§fn test_connection<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EmailResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn test_connection<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EmailResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Test email delivery
Source§fn send_bulk<'life0, 'async_trait>(
&'life0 self,
messages: Vec<EmailMessage>,
) -> Pin<Box<dyn Future<Output = EmailResult<Vec<EmailDeliveryReport>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_bulk<'life0, 'async_trait>(
&'life0 self,
messages: Vec<EmailMessage>,
) -> Pin<Box<dyn Future<Output = EmailResult<Vec<EmailDeliveryReport>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send multiple email messages (bulk send)
Auto Trait Implementations§
impl Freeze for SmtpEmailService
impl RefUnwindSafe for SmtpEmailService
impl Send for SmtpEmailService
impl Sync for SmtpEmailService
impl Unpin for SmtpEmailService
impl UnsafeUnpin for SmtpEmailService
impl UnwindSafe for SmtpEmailService
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