# sms_local_bulk
A Rust crate to simulate sending bulk SMS messages using the [SMSLocal](https://www.smslocal.com) 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](https://httpbin.org) and opens the response in your **default web browser** for visual preview.


---
## ✨ Features
- Bulk SMS sending simulation
- Uses `httpbin.org` for safe mock requests
- Dummy API key (`dummy_api_key_123456`) — no real SMS charges
- Automatically opens server response in your browser
- Great for learning, testing, documentation, or backlinks
---
## 📦 Installation
Add this to your `Cargo.toml`:
```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