Simplify temporary email management and interaction, including message retrieval and attachment downloads, using Rust.

Overview

Tempmail

Version Downloads License Docs

The Tempmail simplifies temporary email management and interaction, including message retrieval and attachment downloads, using the Rust programming language.

Features

  • Create and manage temporary email addresses.
  • Retrieve email messages from the temporary email inbox.
  • Download attachments associated with email messages.
  • Built-in support for popular temporary email domains.
  • Convenient error handling and result types.

Usage

use tempmail::{Domain, Tempmail};

#[tokio::main]
async fn main() {
    // Create a new Tempmail instance with a custom username and domain.
    let tempmail = Tempmail::new("example", Some(Domain::SecMailOrg));

    // Get a list of messages from the temporary email inbox.
    let messages = tempmail.get_messages().await;

    match messages {
        Ok(messages) => {
            for message in messages {
                println!("Id: {}", message.id);
                println!("From: {}", message.from);
                println!("Subject: {}", message.subject);
                println!("Timestamp: {}", message.timestamp);
                println!("Attachments:");
                for attachment in message.attachments {
                    println!("  Filename: {}", attachment.filename);
                    println!("  ContentType: {}", attachment.content_type);
                    println!("  Size: {}", attachment.size);
                }
                println!("Body: {}", message.body);
            }
        }
        Err(error) => {
            eprintln!("Error: {}", error);
        }
    }
}

Installation

To use this library in your project, simply add the following to your Cargo.toml:

[dependencies]
tempmail = "0.2.4"

License

This library is distributed under the terms of the MIT License. See LICENSE for details.

Contributing

Contributions are welcome! Please check out the contribution guidelines before getting started.

You might also like...
This is a Discord bot written in Rust to translate to and from the Bottom Encoding Standard using bottom-rs and Serenity.
This is a Discord bot written in Rust to translate to and from the Bottom Encoding Standard using bottom-rs and Serenity.

bottom-bot This is a Discord bot written in Rust to translate to and from the Bottom Encoding Standard using bottom-rs and Serenity. Ever had this pro

dm-jitaux is a Rust-based JIT compiler using modified auxtools, dmasm and Inkwell LLVM wrapper for boosting Byond DM performance without any hassle!

dm-jitaux is a Rust-based JIT compiler using modified auxtools, dmasm and Inkwell LLVM wrapper for boosting Byond DM performance without any hassle (such as rewriting/refactroing your DM code).

Rust bindings to Cloudflare Worker KV Stores using wasm-bindgen and js-sys.

worker-kv Rust bindings to Cloudflare Worker KV Stores using wasm-bindgen and js-sys

A Simple, But amazing telegram bot, Made using the Rust language!

Telegram bot in Rust A fun Telegram bot made using Rust language.

Modrinth API is a simple library for using, you guessed it, the Modrinth API in Rust projects

Modrinth API is a simple library for using, you guessed it, the Modrinth API in Rust projects. It uses reqwest as its HTTP(S) client and deserialises responses to typed structs using serde.

A translation of Brendan Galea's Vulkan tutorial into Rust using the ash crate
A translation of Brendan Galea's Vulkan tutorial into Rust using the ash crate

Rust Light Vulkan Engine This is a translation of Brendan Galea's Vulkan tutorial into rust using the Ash crate. Original tutorial: Brendan Galea's Yo

Some tools for streaming frames to rpi-rgb-led-matrix using ZeroMQ, written in Rust.

led_matrix_zmq Some tools for streaming frames to rpi-rgb-led-matrix using ZeroMQ, written in Rust. This repository includes: Rust client and server l

Cross-platform GUI written in Rust using ADB to debloat non-rooted android devices
Cross-platform GUI written in Rust using ADB to debloat non-rooted android devices

Cross-platform GUI written in Rust using ADB to debloat non-rooted android devices. Improve your privacy, the security and battery life of your device.

Telegram bot for searching in Arch User Repository ( AUR ); Implemented using rust.

AurSearchBot A Telegram Inline Search Bot Written in Rust Introduction Telegram Bot that can search AUR ( Arch User Repository ) in inline mode. This

Releases(v0.2.4)
  • v0.2.4(Sep 19, 2023)

    What's Changed

    • Added keywords in Cargo.toml
    • Added categories in Cargo.toml

    Full Changelog: https://github.com/a-rustacean/tempmail/compare/v0.2.3...v0.2.4

    Source code(tar.gz)
    Source code(zip)
  • v0.2.3(Sep 9, 2023)

    Additions:

    • get_raw_messages and expand_raw_message methods on Tempmail

    Full Changelog: https://github.com/a-rustacean/tempmail/compare/v0.2.2...v0.2.3

    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(Aug 28, 2023)

  • v0.2.1(Aug 23, 2023)

    Additions:

    • common trait implementation (Send, Sync, PartialEq, etc) on public struct (Domain, Tempmail, TempmailError, TempmailMessage, TempmailAttachment)

    Full Changelog: https://github.com/a-rustacean/tempmail/compare/v0.2.0...v0.2.1

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Aug 15, 2023)

Owner
Dilshad
A full-stack web developer and the proud owner of @free-icons
Dilshad
Meet Rustacean GPT, an experimental project transforming OpenAi's GPT into a helpful, autonomous software engineer to support senior developers and simplify coding life! 🚀🤖🧠

Rustacean GPT Welcome, fellow coding enthusiasts! ?? ?? I am excited to introduce you to Rustacean GPT, my humble yet ambitious project that aims to t

Gary McDougall 3 May 10, 2023
A multipurpose (including music) Discord bot written in Rust

filloabot-rs A multipurpose (including music) Discord bot. This is a full rewrite using Rust of the original FilloaBot. Some features that were consid

FilloaBot 2 Oct 21, 2022
Efficent platform for inference and serving local LLMs including an OpenAI compatible API server.

candle-vllm Efficient platform for inference and serving local LLMs including an OpenAI compatible API server. Features OpenAI compatible API server p

Eric Buehler 21 Nov 15, 2023
A library for working with alpaca.markets APIs, including the Broker API.

alpaca-rs, an unofficial Rust SDK for the Alpaca API (WIP) Features Easy to use - Minimal setup and no boilerplate. Cross-platform - can run on most p

null 4 Dec 2, 2023
A better message queue built by rust

bettermq A better message queue built by rust I start this project to study Rust

Sun Junyi 13 Dec 16, 2022
A Discord bot for control and decentralization of threads management

Threadripper-bot A Discord bot for control and decentralization of threads management About Threadripper aims to serve some extra utilities to take be

S0ra 15 Dec 27, 2022
An ability / resource / cooldown management library for Bevy.

About leafwing-abilities is an opinionated, ready-to-use Bevy library and plugin for handling abilities. It features: cooldown tracking resource manag

null 2 Mar 30, 2022
Runit service management wrappers

void-svtools Basic wrappers for managing services for runit,

Isaac Hung 1 Aug 3, 2022
OpenEMC: open embedded management controller

OpenEMC OpenEMC is an open-source firmware implementing an embedded management controller (EMC) on an STM32F1 microcontroller. It consists of a bootlo

Sebastian Urban 5 Dec 25, 2022
`Debug` in rust, but only supports valid rust syntax and outputs nicely formatted using pretty-please

dbg-pls A Debug-like trait for rust that outputs properly formatted code Showcase Take the following code: let code = r#" [ "Hello, World!

Conrad Ludgate 12 Dec 22, 2022