pub struct Email { /* private fields */ }Expand description
Fluent outbound message (Nodemailer / Laravel-style).
Implementations§
Source§impl Email
impl Email
pub fn new() -> Self
pub fn from(self, addr: impl Into<String>) -> Self
pub fn to(self, addr: impl Into<String>) -> Self
pub fn cc(self, addr: impl Into<String>) -> Self
pub fn bcc(self, addr: impl Into<String>) -> Self
pub fn subject(self, subject: impl Into<String>) -> Self
pub fn text(self, body: impl Into<String>) -> Self
pub fn html(self, body: impl Into<String>) -> Self
pub fn attach(self, path: impl Into<PathBuf>) -> Self
pub fn attach_bytes( self, filename: impl Into<String>, data: impl Into<Vec<u8>>, ) -> Self
Sourcepub async fn send(self) -> Result<()>
pub async fn send(self) -> Result<()>
Send via the client bound by [MailExt::mail] / MailClient::compose.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Email
impl !UnwindSafe for Email
impl Freeze for Email
impl Send for Email
impl Sync for Email
impl Unpin for Email
impl UnsafeUnpin for Email
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