Skip to content
Clone

chore(lib/export): update email module

ZhenYi committed
parent ea6987c commit 2ebe969 Browse files

1 file changed

+15 −0

Modified lib/export/src/email.rs View lib/export/src/email.rs
@@ -94,6 +94,21 @@
9494 self.client()?.send(email).await
9595 }
9696
97 pub async fn send_mail(
98 &self,
99 to: &str,
100 subject: &str,
101 text: &str,
102 html: &str,
103 ) -> Result<(), ExportError> {
104 let email = Email::builder(subject)
105 .to([to])
106 .text_body(text)
107 .html_body(html)
108 .build()?;
109 self.send(&email).await.map(|_| ())
110 }
111
97112 pub async fn send_queued(&self, email: &Email) -> Result<SendResponse, ExportError> {
98113 self.client()?.send_queued(email).await
99114 }