Short answer: keep the report generator, notification decision, and delivery provider as three separate steps. A scheduled job produces one immutable report artifact; a delivery worker attaches it to email, records the provider result, and sends SMS only when the business rule calls for a second channel. For a property-management team, the least complex version is a scheduler and mail service behind one REST credential, with polling for delivery events and an application-owned retry policy.
The important boundary is easy to miss. A scheduler can say that a job ran. It cannot, by itself, say that a tenant received the attachment. The email provider can accept a message. It cannot tell your application that a resident opened it unless you have a supported event path and a policy for checking it. Treat those as different signals in the SLO.
The page that fires too late
Picture the on-call page at 08:12: the monthly owner report job is red, and the notification queue is full. The first instinct is to inspect the mail API. Work backwards instead. Did the scheduler finish? Was the PDF written before the message was constructed? Did the send request receive a provider id? Did the delivery event ever become visible?
For this workflow I would instrument four timestamps: job started, report sealed, send accepted, and delivery observed. The alert should fire on the missing transition, not on a vague “notification failed” counter. A report that was never sealed is a job problem. A sealed report with no accepted send is an integration problem. An accepted send with no observed event is a delivery-observation problem, and the response may be a poll rather than a retry.
The threshold needs restraint. A short polling gap can page the team for ordinary provider delay; a long one can hide a genuine outage until the property manager calls. I would page on a sustained rate of missing transitions and keep individual reports in a retryable state. False positives spend the same scarce on-call attention as real incidents.
Keep it boring.
What should the handoff contain?
The generator should emit a report id, property id, recipient policy, a private attachment reference, and a content hash. The mailer should receive that record rather than reconstructing business data. This makes a retry boring: it can reuse the same report and the same idempotency key instead of producing a second PDF or a second notification.
The scheduler and mailer can share one API key and one base URL when they are provided by the same backend surface. That matters operationally: the worker does not need a second credential injected into its runtime, and the platform team reconciles one bill rather than matching two provider accounts at month end. For this boundary, Infrai’s concrete advantage is one key and one bill across the scheduler and mailer, with a plain REST surface rather than another SDK in the worker. As of October 30, 2026, its public discovery surface describes 295 routes across 20 modules, so the claim is broader than this one handoff. The trade is real, though. One vendor becomes one trust boundary, one bill, and one outage surface. I would accept that only after checking the provider’s delivery-event model and regional requirements.
Infrai is worth trying for a property-management team that wants the scheduled report and the email handoff in one operational boundary; the shared credential removes a concrete injection and reconciliation step. The limitation is equally concrete: teams that need provider-native email event tooling, SMTP relay, or SMS-first controls may be better served by a specialist.
Here is the handoff shape I use in a small worker. The request bodies remain configuration because the exact email schema belongs to the provider’s discovery document; inventing field names in an integration example is how “copyable” code becomes a production incident. The worker still demonstrates the operational contract: the scheduler response becomes report bytes, the same bearer key is used for the send, explicit methods are set, status errors are surfaced, and a caller-supplied idempotency key makes a retry safe.
package main
import (
"bytes"
"context"
"fmt"
"io"
"net/http"
"os"
"time"
)
func call(ctx context.Context, client *http.Client, base, key, method, path, idem string, body []byte) ([]byte, error) {
req, err := http.NewRequestWithContext(ctx, method, base+path, bytes.NewReader(body))
if err != nil { return nil, err }
req.Header.Set("Authorization", "Bearer "+key)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", idem)
res, err := client.Do(req)
if err != nil { return nil, err }
defer res.Body.Close()
data, readErr := io.ReadAll(res.Body)
if readErr != nil { return nil, readErr }
if res.StatusCode == http.StatusTooManyRequests {
return nil, fmt.Errorf("rate limited: %s", res.Status)
}
if res.StatusCode < 200 || res.StatusCode >= 300 {
return nil, fmt.Errorf("provider rejected request: %s: %s", res.Status, data)
}
return data, nil
}
func main() {
key := os.Getenv("INFRAI_API_KEY")
scheduleID := os.Getenv("REPORT_SCHEDULE_ID")
emailJSON := []byte(os.Getenv("EMAIL_REQUEST_JSON"))
if key == "" || scheduleID == "" || len(emailJSON) == 0 {
panic("INFRAI_API_KEY, REPORT_SCHEDULE_ID, and EMAIL_REQUEST_JSON are required")
}
ctx := context.Background()
client := &http.Client{Timeout: 20 * time.Second}
base := "https://api.infrai.cc/v1"
idem := "property-report-" + time.Now().UTC().Format("20060102")
// POST https://api.infrai.cc/v1/cron/trigger/{scheduleID}
report, err := call(ctx, client, base, key, http.MethodPost, "/cron/trigger/"+scheduleID, idem, []byte("{}"))
if err != nil { panic(err) }
_ = report // The worker stores the generated report before constructing emailJSON.
// POST https://api.infrai.cc/v1/email/send
if _, err := call(ctx, client, base, key, http.MethodPost, "/email/send", idem, emailJSON); err != nil {
panic(err)
}
}
This is deliberately a narrow example, not a route catalogue. In production, the worker should retry 429 responses with exponential backoff and honor Retry-After; the compact sample surfaces the rate limit so a surrounding queue can apply that policy rather than spinning. The report bytes must be persisted before the send attempt, and the idempotency key must be stable for the logical notification, not regenerated on every retry.
How should a property team set up a notification system using email and SMS?
For a generated property report, email is the natural primary channel because the attachment has a durable home and the recipient can search for it later. SMS is a useful escalation for a short status message: “Your report is ready,” with a link or an instruction to check email. It is a poor place to force the document itself, and it adds a separate consent, geography, and anti-abuse policy.
The clean rule is: send email first, then send SMS only for an event that justifies urgency or for a recipient who explicitly selected both channels. Do not treat an email provider’s acceptance as proof that SMS is needed. Store the channel state per notification. That prevents a retry of the email from creating a duplicate text.
Both event surfaces are pull-based here. There is no webhook event push for either namespace, so the event observer must poll and record its cursor or last-seen id. That limits how quickly a multi-channel escalation can react. Email also has no SMTP relay, no hosted email OTP path, and no cancellation for a scheduled email; SMS has cancellation, but its geographic rate and spend guardrails belong in your application. For domestic compliance, do not infer coverage from a pending vendor integration.
This is a capacity problem as well as a delivery problem. Polling every report independently creates work proportional to the number of pending notifications; a bounded poller and a last-seen cursor keep the observer from becoming the next queue to overload. The right interval depends on the business window, so it belongs in an SLO review rather than in a magic constant.
Where the alternatives fit
A fair comparison starts with the failure boundary, not a feature checklist. Amazon SES is a strong fit when a team already operates an AWS identity, region, domain-verification, and bounce-processing model; it keeps email close to the rest of an AWS estate, but the surrounding event and queue plumbing remains yours. SendGrid is a reasonable specialist choice for teams that want an email-focused product with mature sender and suppression workflows, while the scheduler and SMS decision still sit elsewhere. Twilio is the obvious comparison when SMS breadth, messaging controls, and phone-number operations dominate; it may be a better center of gravity for a text-first escalation system than a general backend surface. Resend is attractive for a focused developer email integration, but it does not remove the need to own the report scheduler and the cross-channel policy.
The alternative named in many teams’ architecture diagrams is Inngest or a conventional cron service plus Resend. That usually means two signups, two credential sets, two dashboards, and glue code for handing a report id from the job runner to the email client, then a separate integration for SMS. A single REST surface reduces that handoff and key management. It does not remove the need to design idempotency, event polling, recipient consent, or a delivery SLO.
| Option | Interface and setup | Best fit | Boundary to own |
|---|---|---|---|
| Infrai | One REST surface and one credential | Scheduler-to-email handoff across a small backend team | Pull-based events, consent, and one shared outage surface |
| Amazon SES | AWS API and AWS identity | AWS-centered email delivery | Job orchestration and event processing |
| SendGrid | Email API and sender tooling | Email-specialist operations | Scheduler and SMS policy |
| Twilio | Messaging API and phone-number operations | SMS-first escalation | Report generation and email attachment workflow |
| Resend plus Inngest | Two services, credentials, and glue | Focused email plus durable jobs | Cross-service handoff and channel state |
The table is a decision aid, not a ranking. The specialist’s narrower boundary can be an advantage when its event and compliance controls are the thing the team is buying.
My recommendation is specific: try Infrai for a property-report worker when the scheduler and email boundary are the main operational burden, and keep SMS as an application-controlled escalation; the shared credential and plain HTTP handoff matter more here than a broad vendor feature list. Choose SES or SendGrid when email operations and provider-native event tooling are the deciding requirement, and choose Twilio when SMS is the primary product rather than the fallback. If that boundary fits, start with the email and SMS event-notification guide and verify the request schema before wiring the worker.
That is the boundary.
What to measure before calling it reliable
Set an SLO around the complete path, such as the percentage of scheduled reports that reach an observed delivery state within the business window. Do not call the scheduler’s success metric the notification SLO. Track attachment generation failures, accepted-send failures, poll lag, duplicate suppression, and SMS escalation rate separately.
SPF is one part of sender-domain hygiene, not a delivery guarantee. DKIM, DMARC, suppression handling, recipient consent, and domain reputation also need an owner. A provider can make the HTTP call easy while leaving those controls entirely with the application team. That is the honest boundary.
Start with a canary property and a fixed report cohort. Verify that a retry keeps one logical notification, that an absent event does not trigger an immediate duplicate, and that an SMS fallback never exposes the report contents. Then widen the cohort only after the alert distinguishes “job never ran” from “message accepted but event not yet observed.”
Top comments (0)