HomeGuidesEmail QR Code API Guide

Email QR Code API Guide

A developer's email qr code api guide — the mailto: and MATMSG: payload formats, encoding subject and body correctly, generating codes at scale, and what SMLLR's read-only API actually covers.

What an Email QR Code Does

An email QR code encodes a mailto: URI. Scanning it opens the phone's default mail app with the recipient address — and optionally the subject line and message body — already filled in. The user reviews and sends.

As with SMS codes, there is no web service in this flow, so an email qr code api search is really asking one of two questions: what payload format do I encode, or what library do I call to generate the image? Both are answered below, along with a plain statement of what SMLLR's own REST API does and does not do, because that distinction is where most content on this topic quietly misleads.

The mailto Payload Format

The modern, near-universally supported format is the mailto: URI, defined by RFC 6068:

mailto:sales@example.in?subject=Bulk%20order%20enquiry&body=Hi%2C%20I%20saw%20your%20QR%20code

The rules that matter in practice:

  • The address comes immediately after mailto:, with no slashes.
  • The first parameter is introduced with ?, every subsequent one with &.
  • Subject and body must be percent-encoded. Spaces become %20, commas %2C, newlines %0A. An unencoded space or ampersand is the single most common cause of a truncated subject line.
  • cc and bcc are also supported: ?cc=support@example.in&subject=....

SMLLR builds exactly this shape when you create an Email QR code — the address is URI-encoded, and subject and body are each percent-encoded before being appended as parameters.

The older MATMSG: format (MATMSG:TO:a@b.in;SUB:Subject;BODY:Message;;) is a legacy Denso Wave convention. Some dedicated scanner apps still parse it, but native phone cameras — where the overwhelming majority of Indian scans happen — handle mailto: far more reliably. Use mailto:.

Encoding Pitfalls That Break Real Campaigns

Email payloads fail in specific, repeatable ways. The ones worth guarding against:

  • Unencoded special characters. An & inside your body text will be read as a parameter separator and silently truncate everything after it. Always encode the full subject and body, never just the spaces.
  • Line breaks. Use %0A for a newline. Raw newlines in a QR payload are handled inconsistently and can break the URI entirely.
  • Non-Latin scripts. Hindi, Tamil or Bengali text in a subject line must be UTF-8 percent-encoded, which expands it substantially — a short Devanagari subject can add a surprising number of characters to the payload and push the code to a higher, denser QR version.
  • Long bodies make dense codes. A pre-filled body of two or three sentences can easily push the payload past 250 characters. Our data capacity guide covers what that does to scan reliability; the short version is that a long body is a scanning problem, not just an aesthetic one.
  • Desktop vs mobile. On a phone with a configured mail app, mailto: works cleanly. On a desktop with no default mail client set, it can do nothing at all — worth remembering if the code appears on anything that gets screenshotted and opened later.

Generating Email QR Codes Programmatically

For bulk generation — one code per branch, per salesperson, per product line — build the payload and encode it in your own backend.

Python:

import qrcode
from urllib.parse import quote

def email_qr(to: str, subject: str, body: str, out_path: str):
    payload = f"mailto:{to}?subject={quote(subject)}&body={quote(body)}"
    qrcode.make(payload).save(out_path)

email_qr("sales@example.in", "Bulk order enquiry", "Hi, I saw your QR code", "branch_delhi.png")

Node.js:

const QRCode = require('qrcode');

const subject = encodeURIComponent('Bulk order enquiry');
const body = encodeURIComponent('Hi, I saw your QR code');
const payload = `mailto:sales@example.in?subject=${subject}&body=${body}`;
await QRCode.toFile('branch_delhi.png', payload, { errorCorrectionLevel: 'Q' });

Note quote and encodeURIComponent on the subject and body but not on the whole URI — encoding the entire string would escape the ? and & that make the parameters work. Our Python QR code API guide goes further into library choice and output formats.

The Attribution Blind Spot

A raw mailto: QR code is invisible to analytics for the same reason an SMS code is: the scan opens a local app without contacting any server. No scan count, no timestamp, no device split, no per-placement attribution.

For an email code specifically this hurts more than it might seem, because email enquiries are usually a higher-value action than a click — a bulk order enquiry, a distributor application, a B2B lead. Not knowing which trade-show banner, which catalogue page or which dealer counter produced them makes the channel impossible to optimise.

The second problem is permanence. Change the receiving address — a salesperson leaves, a department is restructured, sales@ becomes orders@ — and every printed code routes mail to a dead mailbox. There is no fix without a reprint.

What SMLLR Actually Offers

Stated precisely:

In the dashboard, Email is a QR type available from the Starter plan (₹499/month). Enter the address, subject and body; SMLLR builds and encodes the mailto: payload.

The SMLLR REST API is read-only reporting only. Seven GET endpoints — summary, QR list, QR detail, campaign list, campaign detail, client list, client detail — on the Premium plan (₹14,999/month), limited to 60 requests per minute per key. There is no endpoint to create, edit or delete a QR code, and no endpoint that sends email.

It is worth separating two things that sound similar. SMLLR's Email Marketing feature — campaign sending to your captured leads, backed by a verified sending domain — is a real, shipped product surface available on the Pro plan (₹4,999/month) and up, operated from the dashboard. It is not exposed through the public API, and it is a completely different thing from an email QR code, which just opens the scanner's own mail app. Our email marketing setup guide covers that feature; this post is about the QR payload.

The public API also never returns Lead Hub contact data — no names, emails, phone numbers or consent records — by design.

The Trackable Pattern

If the goal is "make it easy to email us and let me measure it," the better construction is a dynamic QR code pointing at a contact page that carries the mailto: link as a button, or a proper lead capture form.

With the redirect in front, you get scan counts, timestamps, device and city breakdown, and per-code attribution — so you can finally tell whether the catalogue insert or the trade-show banner produced the distributor enquiries. And because the destination is editable, a change of receiving address is a dashboard edit rather than a reprint.

If you go a step further and use a lead capture gate (Lead Hub, Pro plan, ₹4,999/month), the enquiry lands in a structured dashboard with source attribution and consent recorded, rather than as an unstructured email in a shared inbox that nobody can report on.

Create your QR code on SMLLR — the Email type for a direct code, or a dynamic URL code when the enquiry is worth measuring.

Frequently Asked Questions

What is the correct email QR code format?

The mailto: URI defined by RFC 6068 — mailto:sales@example.in?subject=Encoded%20subject&body=Encoded%20body. The first parameter uses ? and subsequent ones use &, and subject and body must both be percent-encoded. The legacy MATMSG: format is handled far less reliably by native phone cameras.

Is there an email QR code API?

Not as a web service. "Email QR code API" means either the mailto: URI payload standard you encode, or a QR generation library you call from your own backend. SMLLR's REST API is read-only reporting with no QR creation endpoint and no email-sending endpoint.

Why does my email QR code cut off the subject line?

Almost always an encoding error. An unencoded & inside the subject or body is read as a parameter separator and silently truncates everything after it. Percent-encode the subject and body individually — but not the whole URI, or you will escape the ? and & that make the parameters work.

How do I add a line break to a pre-filled email body?

Use %0A, the percent-encoded newline. Raw newline characters inside a QR payload are handled inconsistently across scanners and can break the URI entirely.

Can I track scans on a mailto QR code?

Not on a raw one — the scan opens the local mail app without contacting any server, so there is no scan event or attribution. Point a dynamic QR code at a contact page carrying the mailto link instead, and you get scan counts, device and city breakdown, and per-code attribution.

Does the SMLLR API let me send emails?

No. The public REST API is read-only reporting: seven GET endpoints on the Premium plan (₹14,999/month), rate-limited to 60 requests per minute. SMLLR's Email Marketing feature — campaign sending to captured leads from a verified domain — is a real product surface on the Pro plan (₹4,999/month) and up, but it is operated from the dashboard, not through the public API.

What happens if the email address on my printed QR code changes?

Every printed raw mailto code sends mail to the old address, with no fix short of a reprint. A dynamic QR code pointing at a contact page avoids this — you update the address on the page and every printed copy keeps working.

Related Resources