Skip to content

Commit

Permalink
email: Add activation_token
Browse files Browse the repository at this point in the history
Requires version 4.
  • Loading branch information
A6GibKm committed Sep 2, 2023
1 parent aaac2ad commit 5b27879
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/desktop/email.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ struct EmailOptions {
subject: Option<String>,
body: Option<String>,
attachment_fds: Option<Vec<Fd>>,
activation_token: Option<String>,
}

#[derive(Debug)]
Expand Down Expand Up @@ -167,6 +168,13 @@ impl EmailRequest {
self
}

/// Sets the activation token.
#[must_use]
pub fn activation_token<'a>(mut self, activation_token: impl Into<Option<&'a str>>) -> Self {
self.options.activation_token = activation_token.into().map(ToOwned::to_owned);
self
}

/// A different variant of [`Self::attach`].
pub fn add_attachment(&mut self, attachment: &impl AsRawFd) {
let attachment = Fd::from(attachment.as_raw_fd());
Expand Down

0 comments on commit 5b27879

Please sign in to comment.