Send transactional email from Spring Boot with the OquMail API
A runnable Spring Boot example that sends email through OquMail: the endpoint, the auth header, and where to keep your key. Practical guide for…
If your Spring Boot app sends receipts, welcome emails, or alerts, you can push them through OquMail with one HTTPS POST — from your own domain, on the free plan. Here is a working Spring Boot example and the things that trip people up.
Quick summary
- POST https://API (a way for your app or website to send email automatically).oqumail.com/api/v1/emails
- Header: Authorization: Bearer YOUR_API_KEY
- JSON body: from, to, subject, and html (or text)
- Your sending domain must be verified in OquMail (SPF/DKIM/DMARC green).
- The "from" address must be on that verified domain.
The endpoint
- POST https://API (a way for your app or website to send email automatically).oqumail.com/api/v1/emails
- Header: Authorization: Bearer YOUR_API_KEY
- JSON body: from, to, subject, and html (or text)
Spring Boot example
Paste this into your Spring Boot code and swap in your domain and key:
webClient.post().uri("https://api.oqumail.com/api/v1/emails")
.header("Authorization", "Bearer " + apiKey)
.bodyValue(Map.of("from","hello@yourdomain.com","to",user.getEmail(),"subject","Welcome","html","<p>Thanks.</p>"))
.retrieve().toBodilessEntity().block();Spring Boot tip
Use WebClient (reactive) or RestTemplate; keep the key in application properties or a vault.
Before it works
- Your sending domain must be verified in OquMail (SPF/DKIM/DMARC green).
- The "from" address must be on that verified domain.
- Create an API key in the OquMail dashboard; treat it like a password.
- Keep a normal mailbox on the same domain so customer replies reach a human.
Common questions
How long does send transactional email from spring boot with the oqumail api take for a small business?
Most teams finish domain connection and first mailboxes in under an hour. DNS propagation is often minutes; in rare cases wait up to 24–48 hours. OquMail shows live verification so you know when you are ready.
Do I need technical experience to set up business email?
No. If you can log into where you bought your domain and paste a few lines of text, you can set up professional email. OquMail guides you step by step and verifies when DNS is correct.
Can my small team use business email for free?
Yes. OquMail's free plan includes up to 15 mailboxes on your own domain with webmail, guided SPF/DKIM/DMARC setup, and a transactional email API — no credit card required.
Free business email on your own domain
OquMail gives you up to 15 mailboxes on your domain — free — with guided SPF/DKIM/DMARC, webmail, IMAP/SMTP for any mail app, and a send API. Most teams are live in under fifteen minutes. Start at oqumail.com.
Get started free