---
name: meser10-send
description: Use when the user wants their app (built with Claude Code) to send email or SMS that reaches the inbox, or when mail from their app lands in spam. Asks five questions, checks the sending domain, then writes sending code against the Meser 10 API and sends a test to the user.
---

# Send email and SMS from your app, and land in the inbox

You help the user add sending to an app they are building. The order matters: questions first, domain second, code third, test last. Do not write sending code before steps 1 and 2 are done.

Speak the user's language. If they write in Hebrew, answer in Hebrew.

## Step 1. Ask these five questions, one message, numbered

1. What do you send: verification codes (OTP), system messages (receipts, password reset, reminders), or a newsletter to a list?
2. From which domain will the mail go out (for example myapp.co.il)?
3. Roughly how many messages a month, and is this domain new to sending?
4. Do you also need SMS?
5. Which language: Hebrew, English or both?

Wait for the answers. If something is unclear, ask once more, briefly.

## Step 2. Check the domain before any code

Run real DNS lookups for the domain from question 2 (Node `dns.promises`, `dig` or `nslookup`, whichever works here). Report each line as ok, missing or weak:

- **SPF**: a TXT record on the domain that starts with `v=spf1`. Missing, or more than one SPF record, is a problem.
- **DMARC**: a TXT record on `_dmarc.<domain>` that starts with `v=DMARC1`. Missing is a problem. `p=none` is acceptable to start with.
- **DKIM**: ask the user for the DKIM records Meser 10 sent them for this domain (the DNS setup file from support), and check that each one resolves. If they have not received them yet, tell them to open an account and ask support for the sending-domain DNS records.
- **MX**: note whether the domain receives mail. A reply-to address that cannot receive mail loses every reply.

Also point them to the free check, which tests all of this with a score out of 100: https://www.meser10.co.il/tools/domain-ready/

If the domain is new to sending and the answer to question 3 is more than a few hundred a month, say so plainly: a new domain that starts at full volume is the most common reason for spam placement. Meser 10 warms up the domain for the customer (gradual volume and real engagement), so they do not have to manage it themselves.

Give the missing records ready to copy, one per block, and stop until the user says the records are in place. Then look them up again.

## Step 3. Write the sending code

Use the Meser 10 JSON API.

- Endpoint: `POST https://heb.mesereser.com/Services/JsonServices.aspx?f=<FunctionName>`
- Headers on every call: `Content-Type: application/json`, `ApiKey: <key>`, and a User-Agent of the app's own (for example `my-app/1.0`). A request without a custom User-Agent can be blocked and return a page that is not JSON.
- The key comes from the environment variable `MESER10_API_KEY`. Never write it into a file, a commit, a log line or an error message. Add `.env` to `.gitignore`.
- The API key is issued in the Meser 10 account: My account, Advanced settings, API settings.
- Full contract: https://www.meser10.co.il/api-docs/meser10-json-api.json . Read it before using a function that is not listed here.

Reading the answer: every call returns HTTP 200, also on failure. Decide by `ErrorCode` only, normalized with `Number()`. `0` success. `1` key wrong or revoked: stop, never retry in a loop. `3` missing required field. `4` missing or invalid parameter (for SMS also: sender name not verified). A missing or empty `ErrorCode` is a failure. A body that is not JSON means the request was blocked (User-Agent or IP allow-list), not an API answer.

**Email, `SendSingleEMailMessage`**: fields `ToEMail`, `Subject`, `Body` (HTML, UTF-8), `FromName` (display name only), `ReplyToEMail` (required), `LinkClickCountType` (empty string is fine). One recipient per call. The From address comes from the verified domain in the account. For Hebrew wrap the body in `<div dir="rtl">`. Recipients who unsubscribed are skipped by the platform, also for API sends.

**SMS, `SendSingleSmsMessage`**: fields `ToPhone`, `MessageBody`, `FromName`. `FromName` is up to 11 characters, Latin letters, digits and space, with at least one letter, and must be verified in the account. Hebrew SMS: one part holds up to 70 characters; a longer message is split into parts of 67 and each part is counted.

**Lists and newsletters**: do not loop the single-message call over a list. Campaigns, lists and reports belong in the Meser 10 account, or through the Meser 10 MCP server for Claude Code (`npx -y @meser10/mcp-server`, with `MESER10_MODE=read` so it can only read).

Match the code to question 1: OTP code with a short expiry and a resend limit; system messages triggered by the app's events; newsletter handled in the account, not in app code.

## Step 4. Test before going live

Before any real send, also to one person, show the user the exact text and the recipient and wait for a yes.

Send one test message to the user's own address (and phone, if SMS). Ask them to check whether it arrived in the inbox, in promotions, or in spam, and to open the message headers: SPF, DKIM and DMARC should all show pass. If something fails, go back to step 2.

## When to suggest a person

If the domain is already listed on a blacklist, if the user needs to send to a large list soon, or if tests keep landing in spam after the records pass, suggest talking to Meser 10 support: support@meser10.co.il, 03-7440020.
