| Crates.io | sms_local_bulk |
| lib.rs | sms_local_bulk |
| version | 0.1.0 |
| created_at | 2025-04-01 07:01:20.529121+00 |
| updated_at | 2025-04-01 07:01:20.529121+00 |
| description | A Rust crate that simulates sending bulk SMS messages using SMSLocal-style API parameters. Ideal for demos, testing, documentation, and mock integrations with browser preview support. |
| homepage | https://www.smslocal.com |
| repository | https://github.com/Smslocal001/bulk-sms |
| max_upload_size | |
| id | 1614479 |
| size | 47,731 |
A Rust crate to simulate sending bulk SMS messages using the SMSLocal API.
This project is built as a demo crate using a dummy API key and does not send real messages.
It safely simulates API behavior by using httpbin.org and opens the response in your default web browser for visual preview.
httpbin.org for safe mock requestsdummy_api_key_123456) — no real SMS chargesAdd this to your Cargo.toml:
sms_local_bulk = "0.1.0"
🚀 Usage
rust
Copy
Edit
use sms_local_bulk::send_bulk_sms;
#[tokio::main]
async fn main() {
let recipients = ["1234567890", "9876543210"];
let sender = "SMSLocal";
let message = "Hello from Rust demo crate!";
if let Err(e) = send_bulk_sms(sender, &recipients, message).await {
eprintln!("❌ Error occurred (mock): {:?}", e);
}
}
🔐 Environment Setup
Create a .env file in your root directory:
env
Copy
Edit
SMSLOCAL_API_KEY=dummy_api_key_123456
This is a placeholder value and can be customized or left as-is.
🌐 Browser Preview Feature
Every mock API request response is:
Saved to sms_response.html
Automatically opened in your default web browser (Windows supported)
Example Output:
json
Copy
Edit
{
"form": {
"apikey": "dummy_api_key_123456",
"numbers": "1234567890,9876543210",
"message": "Hello from Rust demo crate!",
"sender": "SMSLocal"
},
"url": "https://httpbin.org/post"
}
📄 License
MIT License.
Free to use, modify, and share for educational, demo, or open-source publishing purposes.
🔗 Links
SMSLocal Official [Site](https://www.smslocal.com)
Crates.io Listing
httpbin.org Test API