SendGrid Mailer
Lightweight Azure Functions endpoint that delivers email through the SendGrid API. Useful for notifications, test emails, and scripted delivery with optional attachments.
Typical API response
HTTP 200 · application/json
{"status":"sent","messageId":"abc123..."}
Each successful request delivers one email via SendGrid.
Endpoint
POST /api/sendmail
Phase 1 uses authLevel: anonymous for testing. Phase 2 will require ?code=<function-key>.
About
The API sends one email per request using the Node.js @sendgrid/mail SDK
(api.sendgrid.com by default). The SendGrid API key is stored server-side and passed as a Bearer token —
callers never supply it.
Supported JSON fields: to, from, subject, contentHtml,
contentText, and attachments (base64-encoded).
Usage notes
POST /api/sendmailsends one email with the supplied or default values.- Defaults to
noreply@louwmangroup.nlforfromandonline@louwmanictservices.nlfortowhen omitted. - At least one of
contentHtmlorcontentTextis required. - Attachments are passed as base64 in the JSON body (
filename+content). - Phase 1 uses
authLevel: anonymouson/api/sendmailfor easy testing. GET /api/healthreturns{"status":"ok"}for pipeline health checks.
Try it
curl -X POST "http://localhost:7071/api/sendmail" \ -H "Content-Type: application/json" \ -d @test/sample-payload.json
Team
Maintained by the Online team at Louwman ICT Services. Questions or feedback? Contact online@louwmanictservices.nl.
Changelog
1.0.0
15 July 2026
- Added HTTP-triggered Azure Function that sends email via SendGrid API
- Added splash page, health check endpoint, and deployment pipeline automation
- Added test payload template with optional attachment support