mail

CCMail v1.1

A tiny, client-ship-ready mail endpoint for simple website forms.

What you get


Files


Install

Upload the folder to somewhere that runs PHP, for example:

https://cdn.yourdomain.com/ccmail/

Make sure your server can write to:


Configure

Edit mail-config.php:

mail() mode (default)

Keep:

'mode' => 'mail',

Set:

'mode' => 'smtp',

and fill smtp.host, smtp.username, smtp.password, etc.


Frontend integration

Use the included contact-form-example.html or post JSON like:

fetch("https://cdn.yourdomain.com/ccmail/mail-api.php", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    name: "Luan",
    email: "luan@example.com",
    phone: "",
    subject: "Hello",
    message: "Testing",
    website: "" // honeypot
  })
})

Notes for production