| Crates.io | quickmail |
| lib.rs | quickmail |
| version | 0.1.2 |
| created_at | 2025-03-12 05:03:54.773094+00 |
| updated_at | 2025-03-12 13:42:34.202088+00 |
| description | A fast command-line tool for sending emails |
| homepage | |
| repository | https://github.com/medopaw/quickmail |
| max_upload_size | |
| id | 1589389 |
| size | 70,739 |
A simple command-line email sending tool written in Rust.
cargo install quickmail
cargo build --release
The compiled binary will be located at target/release/quickmail.
~/.quickmail.yml in your home directory (recommended)config.yml in the current directory--config)# Option 1: Create in home directory (recommended)
cp config.yml.example ~/.quickmail.yml
# Option 2: Create in current directory
cp config.yml.example config.yml
config.yml file, fill in your email and SMTP server information:# Email configuration
sender: "your.email@example.com"
receiver: "recipient@example.com"
smtp_server: "smtp.example.com"
smtp_port: 587
# Keychain access parameters
keychain_service: "quickmail"
keychain_account: "your.email@example.com"
On macOS, you can use the following command:
security add-generic-password -s "quickmail" -a "your.email@example.com" -w "your-password"
Make sure that keychain_service and keychain_account match the values you used when storing the password.
On platforms other than Mac, Rust's Keyring library should also provide other password services, but the author hasn't tested them. Please check the Keyring library documentation for more information.
# Use the default configuration search path (first config.yml in current directory, then ~/.quickmail.yml)
quickmail --title "Email Title" --message "Email Content"
# Specify a configuration file
quickmail --title "Email Title" --message "Email Content" --config "my-config.yml"
# Use short parameters
quickmail -t "Email Title" -m "Email Content" -c "my-config.yml"
If you encounter problems, the program will provide detailed error information to help you diagnose the issue. Common problems include:
一个简单的命令行邮件发送工具,使用 Rust 编写。
cargo install quickmail
cargo build --release
编译后的二进制文件将位于 target/release/quickmail。
~/.quickmail.yml(推荐)config.yml--config 指定)# 选项1:在主目录中创建(推荐)
cp config.yml.example ~/.quickmail.yml
# 选项2:在当前目录中创建
cp config.yml.example config.yml
config.yml 文件,填入您的邮箱和 SMTP 服务器信息:# Email configuration
sender: "your.email@example.com"
receiver: "recipient@example.com"
smtp_server: "smtp.example.com"
smtp_port: 587
# Keychain access parameters
keychain_service: "quickmail"
keychain_account: "your.email@example.com"
在 macOS 上,可以使用以下命令:
security add-generic-password -s "quickmail" -a "your.email@example.com" -w "your-password"
请确保 keychain_service 和 keychain_account 与您存储密码时使用的值一致。
在 Mac 以外的平台上,Rust 的 Keyring 库应该也提供其他密码服务,但作者没有测试过。请查看 Keyring 库的文档 以获取更多信息。
# 使用默认配置文件搜索路径(首先是当前目录下的 config.yml,然后是 ~/.quickmail.yml)
quickmail --title "邮件标题" --message "邮件内容"
# 指定配置文件
quickmail --title "邮件标题" --message "邮件内容" --config "my-config.yml"
# 使用短参数
quickmail -t "邮件标题" -m "邮件内容" -c "my-config.yml"
如果遇到问题,程序会提供详细的错误信息,帮助您诊断问题所在。常见问题包括: