improved readibility

This commit is contained in:
git 2025-06-17 14:25:02 +01:00
parent bb35d5691c
commit 401c7a2bbc

View File

@ -18,17 +18,11 @@ This is a simple PHP webhook endpoint designed to receive incoming emails from [
## 📁 Folder Structure
data/
└── emails/
└── example.com/
└── alice/
├── 65ef123e4c1a0.eml
├── index.php # optional
└── index.sh # optional
---
@ -39,12 +33,13 @@ data/
```bash
git clone https://github.com/yourusername/email-webhook-receiver.git
cd email-webhook-receiver
```
2. Make sure data/emails/ is writable by your web server:
```bash
mkdir -p data/emails
chmod -R 775 data/emails
```
3. Configure your web server (e.g., Apache or Nginx + PHP) to POST email data to this script.
@ -53,13 +48,13 @@ chmod -R 775 data/emails
📨 Using with ForwardEmail.net
In your ForwardEmail account settings, set the Webhook URL to this script:
```
https://yourdomain.com/path/to/index.php
```
Make sure your server is publicly accessible and uses HTTPS.
ForwardEmail will send JSON payloads like:
```json
{
"raw": "Full raw email as string...",
"from": {
@ -70,16 +65,16 @@ ForwardEmail will send JSON payloads like:
]
}
}
```
🧪 Local CLI Testing
You can test the webhook manually via CLI:
```bash
php index.php < sample.json
```
Where sample.json contains a raw test email in JSON format.