You built a portfolio, wired the contact form to EmailJS, and it worked. Months later someone tells you they wrote and you never got it. Nothing in your code changed. So what broke?
EmailJS sends email from JavaScript in the browser. Your page calls EmailJS with a public key, a service ID and a template ID, and EmailJS sends the email through the email account you connected. That's four moving parts: your page, your keys, your EmailJS plan and your email account. A form goes quiet when any one of them changes.
Below are the usual causes, in the order to check them, with the fix for each. At the end there's a simpler setup that keeps no key in your page and stores every message, so a failed email doesn't lose it.
Step 0: find the actual error
Don't guess. Open your live site, press F12 to open the developer tools, and go to the Console and Network tabs. Then send the form once.
In the Network tab, look for a request to api.emailjs.com. If there is no such request, the problem is in your page: the script didn't load, or your submit handler failed before it sent anything. If there is a request, click it and read the response. EmailJS answers a failure with a status code and a short text message, and that text usually names the problem.
Also log in to the EmailJS dashboard and check its history of sent requests. If your request shows up there with an error, the problem is on the EmailJS or email account side, not in your code.
Make sure your code doesn't swallow errors. If your send call has no catch, or the catch does nothing, the visitor sees nothing and so do you. Log the error with console.error(error) while you debug.
Cause 1: the monthly limit ran out
This is the most common cause on a free account, and it can look like a random failure. As of November 24, 2026, the EmailJS free plan includes 200 requests a month, according to its pricing page. The same page says that once you hit 100% of your plan's monthly limit, further requests are dropped. It doesn't charge overage. EmailJS also says it sends notifications at 80%, 95% and 100%, so check the inbox you signed up with.
Bots often burn through the quota for you. A public contact form gets spam, and every spam send counts as a request. If your form worked early in the month and stopped later, this is likely the cause.
Fixes: wait for the next month, upgrade (the Personal plan was $9 a month for 2,000 requests on the same date), or block bots before they reach the send call. A hidden honeypot field that your script checks before sending is a cheap first step. EmailJS also says in its FAQ that you can turn on reCAPTCHA.
Cause 2: the keys are missing on the live site
The classic case: the form works on localhost and fails once deployed. Usually your service ID, template ID or public key comes from an environment variable that only exists on your computer.
Check how your build tool exposes variables to browser code. Vite only exposes variables whose names start with VITE_, read as import.meta.env.VITE_EMAILJS_KEY. Next.js only sends variables that start with NEXT_PUBLIC_ to the browser. Then add the same variables in your host's settings (Vercel, Netlify and the like) and redeploy, because these values are baked in at build time.
A quick test: add console.log of the three values just before the send call, deploy, and look at the console. If any of them reads undefined, you've found the problem. Remove the log afterwards.
If you regenerated your public key in the EmailJS dashboard, or deleted and recreated the service or template, the IDs changed. Copy the current values from the dashboard into your code or variables.
Cause 3: the email account connection broke
EmailJS sends through an email service you connect, such as a Gmail account or your own mail server. If that connection stops working, every send fails, even though your page and keys are fine.
This happens when you change the email account's password, revoke EmailJS's access in your Google account's security settings, or your mail host changes its server settings. The error text in the response or the dashboard history usually mentions the email provider.
The fix is to open Email Services in the EmailJS dashboard, reconnect the account and send a test. If you connected an SMTP server, check the host, port, user name and password against what your mail provider currently lists.
Cause 4: it sends, but the email is empty or wrong
If emails arrive with blank fields, the names in your form don't match the variables in your EmailJS template. With sendForm, an input named message fills the template variable {{message}}. If the input is called msg, or the template says {{user_message}}, that part comes out empty.
Open the template in the dashboard, list its variables, and give each input the same name attribute. Check the To field in the template too. If it uses a variable that your form doesn't send, the email has nowhere to go.
Cause 5: an allowlist, a new domain or old code
EmailJS lets paid accounts restrict requests to listed domains. Its allowlist FAQ points to a Domains setting in the dashboard that checks the address of the page sending the request. If you set this up and then moved your portfolio to a new domain or added www, requests from the new address are refused. Add the new address.
If the portfolio is a few years old, compare your code with the current installation page. As of November 24, 2026, it installs the @emailjs/browser package and calls emailjs.init({ publicKey: 'YOUR_PUBLIC_KEY' }). If you load an older package or pass the key differently, update to match the current docs.
Cause 6: the email went to spam
If the EmailJS history shows the send went through but nothing is in your inbox, search your spam and junk folders, and your Promotions tab in Gmail. Mark the message as not spam and add the sending address to your contacts. If you send through your own domain, make sure its SPF and DKIM records allow the server EmailJS sends through. Your mail provider's help pages list the exact records.
Quick checklist
| What you see | Likely cause | Fix |
|---|---|---|
| No request to api.emailjs.com in the Network tab | Script error or submit handler broken | Read the console error, fix the handler |
| Worked early in the month, fails later | Monthly request limit reached | Wait, upgrade, or block bots before sending |
| Works on localhost, fails on the live site | Keys missing from the host's environment variables | Use the right prefix, add the variables, redeploy |
| Error mentions Gmail or SMTP | Email account connection broke | Reconnect the service in the dashboard |
| Email arrives with blank fields | Input names don't match template variables | Rename inputs to match |
| Failed after a domain move | Domain allowlist | Add the new domain |
| Dashboard says sent, inbox is empty | Spam filtering | Check spam, fix SPF and DKIM |
The no-key alternative: a form backend
If you'd rather not debug this again, there's a simpler model. A form backend gives you one address. You set it as your form's action, and the browser posts the form there like any normal form. The service stores the submission, filters spam and emails you. You keep no public key in your page, need no template or email account to connect, and the form works even with JavaScript turned off.
Most services work this way: Formspree, Basin, FormSubmit and others. We compare them, with prices, in EmailJS alternatives. The thing to look for is storage. When submissions are stored, a message isn't lost just because one email failed. You can still read it in the inbox.
FormTango is our product, so weigh this accordingly. It's a form backend with a free plan of 1,000 submissions a month, spam filtering without a CAPTCHA, and an inbox that keeps every submission. Here is the whole form: <form action="https://formtango.com/f/YOUR_FORM_ID" method="POST"> with inputs named name, email and message, and a submit button. When the form has a field named email, replying to the notification replies to the visitor.
If you want to stay on the page and show a success message, like your EmailJS setup did, send the form with fetch: fetch(form.action, { method: 'POST', headers: { Accept: 'application/json' }, body: new FormData(form) }). Then show your message when response.ok is true. The full pattern is in how to submit a form with fetch.
Switching from EmailJS in five steps
- Create a form at your form backend and copy its endpoint address.
- Remove the EmailJS script tag or import, the init call and the send call.
- Set the form's action to the endpoint and its method to POST, and give every input a name attribute.
- Send a test submission. On FormTango, add a field named _test with the value 1 so it isn't counted and no email is sent. See how to test a form.
- Send one real message from your phone and confirm the email arrives. Then delete the old EmailJS environment variables from your host.
Common questions
- Why does my EmailJS form work locally but not after deploying?
- Usually the service ID, template ID or public key comes from an environment variable that exists only on your computer. Add the variables in your host's settings with the prefix your build tool needs (VITE_ for Vite, NEXT_PUBLIC_ for Next.js), then redeploy.
- How many emails can I send with EmailJS for free?
- As of November 24, 2026, the free plan on the EmailJS pricing page includes 200 requests a month. After the limit, further requests are dropped until the next month, unless you upgrade.
- Why did EmailJS stop working without any code changes?
- The usual reasons are a used-up monthly quota (often from spam bots), a broken connection to the email account EmailJS sends through, or a key or ID that was regenerated in the dashboard. Read the response to the failed request and the dashboard history to see which.
- Is there a contact form option that needs no API key in the page?
- Yes. A form backend gives you an endpoint address to use as the form's action. The page holds only that address, which can receive submissions but can't read them, so it's safe in public code.
Written by the FormTango team. Facts about other services were read from their own pages on November 22, 2026. Spotted something out of date? Tell us and we will fix it.