With a template
The cleanest way: the content lives in Lekalao, the application sends only the data. Create a template namedorder-confirmation (Transactional templates), then:
Without a template
Send the HTML as it is:The fields
In several languages
A template can have one version per language (Languages).locale picks it:
Pass your customer’s language as your application knows it: Lekalao falls back on its own.
The answer
201 once the provider has taken the e-mail:
502 when the provider refused it: the e-mail is logged with status: failed and the reason in failure_reason. It is failed too when the plan’s monthly allowance is used up.
422 when the sender is not allowed, when neither template nor html is given, or when there is no recipient at all.
Sending is synchronous: the answer comes back once the provider has
replied. Call the API from a background job of your application, not during
your customer’s own request.
Follow and send again
Bounces and complaints arrive through the
mail.bounced and mail.complaint webhooks.
Other roads
- A Laravel application can keep
Mail::to()->send(): see Laravel transport. - Software that only speaks SMTP: see SMTP relay.