Expand description
Compose an email.
Wrapper of the DBus interface: org.freedesktop.portal.Email
.
§Examples
Compose an email
use std::{fs::File, os::fd::OwnedFd};
use ashpd::desktop::email::EmailRequest;
async fn run() -> ashpd::Result<()> {
let file = File::open("/home/bilelmoussaoui/Downloads/adwaita-night.jpg").unwrap();
EmailRequest::default()
.address("test@gmail.com")
.subject("email subject")
.body("the pre-filled email body")
.attach(OwnedFd::from(file))
.send()
.await;
Ok(())
}
Structs§
- Email
Request - A builder-pattern type to compose an email.