═══════════════════════════════════════════════════════
  NOLIMIT-X — Placeholder & Function Reference
═══════════════════════════════════════════════════════

Use in: messages.html, subjects.txt, senders.txt,
        config.json (from_name, mail_subject), attachment filenames.

───────────────────────────────────────────────────────
 CONTEXT PLACEHOLDERS
───────────────────────────────────────────────────────

{{EMAIL}}              john@company.com
{{DOMAIN}}             company.com
{{NAME}}               John Smith
{{FIRST_NAME}}         John
{{FULL_NAME}}          John Smith
{{COMPANY}}            Company Inc
{{LINK}}               Campaign link
{{SMTP_NAME}}          Sender display name
{{FROM_EMAIL}}         Sender email
{{QRCODE}}             QR code image (set qr_link in config)
{{FAVICON}}            Company favicon image
{{BASE_TAG}}           <base href> for link hiding
{{TIMESTAMP}}          2026-04-22T17:00:00.000Z
{{RANDOM}}             482719
{{LANGUAGE}}           en / fr / de / es
{{CONFIDENCE}}         0.98
{{CULTURAL_GREETING}}  Hello John,  /  Bonjour John,
{{CULTURAL_CLOSING}}   Best regards,  /  Cordialement,
{{FORMATTED_DATE}}     April 22, 2026
{{FORMATTED_NUMBER}}   1,234.56
{{CURRENCY}}           $  /  €  /  £

───────────────────────────────────────────────────────
 FUNCTION PLACEHOLDERS
───────────────────────────────────────────────────────

{{RANDOM(N)}}             {{RANDOM(5)}}          → 48271
{{STRING(N)}}             {{STRING(8)}}          → aB3kZ9mQ
{{STRING(N,type)}}        {{STRING(6,upper)}}    → KZMWRQ
                          {{STRING(4,num)}}       → 7291
                          types: alpha upper lower num mixed
{{UUID}}                  {{UUID}}               → 1ca732e5-76c1-4d5d-cf5d-ec02d97ec09d
                          RFC 4122 v4 UUID — unique per call, use multiple times freely
                          Example: {{UUID}}:{{UUID}}_{{DATE}}
                          → 1ca732e5-76c1-51d5-cf5d-ec02d97ec09d:5bd4ce97-4221-47ac-b02a-f59a94c93f6c_2026-05-26

{{UPPERCASE:text}}        {{UPPERCASE:hello}}    → HELLO
{{LOWERCASE:text}}        {{LOWERCASE:HELLO}}    → hello
{{CAPITALIZE:text}}       {{CAPITALIZE:hello world}} → Hello world
{{NAMECASE:text}}         {{NAMECASE:john doe}}  → John Doe
{{SENTENCECASE:text}}     {{SENTENCECASE:hELLO}} → Hello

{{DATE}}                  2026-04-23             (today)
{{DATE(+1)}}              2026-04-24             (tomorrow)
{{DATE(+7)}}              2026-04-30             (next week)
{{DATE(+30)}}             2026-05-23             (30 days out)
{{DATE(-1)}}              2026-04-22             (yesterday)
{{TIME}}                  17:00:00
{{TIMESTAMP}}             2026-04-22T17:00:00.000Z

{{BASE64:text}}           {{BASE64:hello}}       → aGVsbG8=
{{ENCODE:text}}           RFC 2047 base64        → =?UTF-8?B?...?=
{{QP:text}}               RFC 2047 quoted-print  → =?UTF-8?Q?...?=

───────────────────────────────────────────────────────
 NESTING
───────────────────────────────────────────────────────

{{UPPERCASE:{{NAME}}}}
{{NAMECASE:{{COMPANY}}}}
{{CAPITALIZE:{{FIRST_NAME}}}}

───────────────────────────────────────────────────────
 CONFIG — from_name
───────────────────────────────────────────────────────

"from_name": "{{COMPANY}} Support"
"from_name": "{{SMTP_NAME}}"
"from_name": ""                                        ← auto sender name
"from_name": "{{ENCODE:Apple Support <security@apple.com>}}"

───────────────────────────────────────────────────────
 CONFIG OPTIONS
───────────────────────────────────────────────────────

multiple_senders          Rotate senders.txt
subject_rotation          Rotate subjects.txt
qr_code                   Embed QR in body
qr_link                   URL encoded in QR
qr_in_attachment          QR in attachment instead of body
direct_mx                 Send directly via MX
use_nodemailer            Use Nodemailer instead of Rust
raw_smtp                  Raw SMTP mode
message_to_pdf            Convert HTML attachment to PDF
message_to_image          Screenshot messages.html and send as inline image (no attachment needed)
image_width               Viewport width for screenshot (default: 800)
image_height              Viewport height for screenshot (default: 600)
image_quality             JPEG quality 1-100 (default: 92, png ignores this)
turbo_mode                High-speed parallel sending
delay_sending             Delay between sends
delay_sending_seconds     Delay in seconds
calendar_invite           Send .ics invite with email

───────────────────────────────────────────────────────
 CLI COMMANDS
───────────────────────────────────────────────────────

nolimit send                     Send campaign
nolimit auth microsoft           Authenticate Microsoft account
nolimit auth google              Authenticate Google account
nolimit contacts                 Extract contacts → extracted/
nolimit contacts --organize      Extract all smtps.txt → extracted/<user>/
nolimit sort                     Sort emails.txt by provider → sorted/
nolimit validate safe            Validate emails (safe mode)
nolimit dkim <domain> <smtphost> Generate DKIM key pair for your domain.
                                 Resolves the SMTP server's outgoing IP,
                                 generates RSA-2048 key pair, saves private
                                 key to dkim_keys/, and prints the exact
                                 SPF + DKIM DNS records to add at your
                                 registrar. Sets "dkim": true in config.json
                                 automatically. Run once per domain.


───────────────────────────────────────────────────────
 OAUTH2 SMTP FORMAT  (smtps.txt)
───────────────────────────────────────────────────────

{
  "host": "smtp.office365.com",
  "port": 587,
  "user": "user@outlook.com",
  "name": "John Doe",
  "access_token": "...",
  "graph_token": "...",
  "refresh_token": "..."
}

───────────────────────────────────────────────────────
 DKIM SIGNING
───────────────────────────────────────────────────────

"dkim": true       Enable DKIM signing for all outgoing emails.
                   Requires running `nolimit keygen` first to
                   generate the key pair and DNS records.

"dkim": false      Disabled (default).

How it works:
  1. Run: nolimit dkim yourdomain.com smtp.host.com
  2. Add 2 TXT records at your DNS registrar (printed by the command):
       SPF:  v=spf1 ip4:<smtp_ip> ~all
       DKIM: v=DKIM1; k=rsa; p=<public_key>
             Name: <random6chars>._domainkey.yourdomain.com
             (selector is auto-generated — random 6-char string, looks like any service)
  3. "dkim": true is set in config.json automatically
  4. Every email is now cryptographically signed — DKIM passes ✓

State file: dkim_keys/.dkim-state.json (managed automatically)
Private key: dkim_keys/<domain>.pem (keep secure, never share)

The SMTP relay is still your normal smtp[] config. DKIM signs
the email at the From: domain level — the relay just delivers it.

───────────────────────────────────────────────────────
 SMART FROM: ADDRESS GENERATOR
───────────────────────────────────────────────────────

When "from_email" is empty or not set, the sender auto-generates
a realistic service-style From: address using your DKIM domain.

Examples of generated addresses:
  mailnotifications@yourdomain.com
  alertnotification@yourdomain.com
  mailoauthnotification@yourdomain.com
  securityalerts@yourdomain.com
  accountnotifications@yourdomain.com
  systemnotifications@yourdomain.com
  authsystem@yourdomain.com
  loginverification@yourdomain.com
  oauthservice@yourdomain.com
  customerservice@yourdomain.com
  billing@yourdomain.com
  noreply@yourdomain.com
  support@yourdomain.com
  updates@yourdomain.com
  ... (30+ prefix pool, rotated randomly per email)

30% of the time a short number suffix is appended:
  securityalerts42@yourdomain.com
  mailnotifications7@yourdomain.com

Config behavior:
  "from_email": ""         → auto-generate from pool (uses DKIM domain)
  "from_email": "no-reply@yourdomain.com"  → use exactly as-is, no generation

