POST /contact.ashx #
Submit a contact form. The handler validates the inputs, verifies the captcha first, applies an IP-based rate limit, and drops an RFC 822 .eml file into the IIS SMTP pickup directory for delivery via the configured smart host.
Request
Form fields (application/x-www-form-urlencoded or multipart/form-data):
name— 1–120 charsemail— valid RFC 5321-shapesubject— 0–200 charsmessage— 1–6000 charscaptcha_token— signed token from/captcha.ashxcaptcha_answer— the integer the user typed in
Response
application/json: { "ok": true } on success.
Errors
400— missing field / field too long / invalid email / captcha failed405— non-POST429— 5 messages per IP per hour500— pickup directory misconfigured or unwritable
Example
curl -X POST https://phone.codeb.io/contact.ashx \ -d "name=Jane" -d "email=jane@example.com" \ -d "subject=Hi" -d "message=Demo, please" \ -d "captcha_token=…" -d "captcha_answer=8"
Captcha is verified before the rate-limit counter increments, so a bot that doesn't solve the math can’t fill your rate window. The submitting IP comes from
X-Forwarded-For when present, else UserHostAddress.