Crates.io | notify-me |
lib.rs | notify-me |
version | 0.2.0 |
source | src |
created_at | 2023-03-01 11:38:39.878327 |
updated_at | 2023-03-02 12:24:03.948458 |
description | Send notifications to email or communication software, such as WeChat. |
homepage | https://github.com/ShuochengWang/notify-me |
repository | https://github.com/ShuochengWang/notify-me |
max_upload_size | |
id | 797938 |
size | 9,721 |
Send notifications to email or communication software, such as WeChat. It is very suitable for developers to receive notifications of their software on mobile phones.
To use this library, add the following to your Cargo.toml
:
[dependencies]
notify-me = "0.2"
Note that, this crate use xtuis to implement WeChat notifications.
Hence you have to first follow the WeChat official account of xtuis and get the token
.
use notify_me::{Notify, WechatNotifier};
let notifier = WechatNotifier::new("your xtuis token").unwrap();
notifier.notify("notification title", "notification content").unwrap();
use notify_me::{Notify, EmailNotifier};
let notifier = EmailNotifier::new("smtp_host", "smtp_username", "smtp_password", "recipient").unwrap();
notifier.notify("notification title", "notification content").unwrap();
This program is distributed under the terms of the MIT license.
See LICENSE for details.