mailofly library

Official Dart client for the Mailofly REST API.

Constants

kDefaultBaseUrl → const String

Functions

buildComposeRequestBody({required String accountKey, String? templateId, String? subject, String? body, String? to, List<String>? toList, List<String>? cc, List<String>? bcc, List<String>? contactIds, Map<String, String>? variables}) → Map<String, dynamic>
@deprecated Use buildEmailsRequestBody instead.
buildEmailsRequestBody({required String from, required Object to, String? subject, String? html, String? text, String? accountKey, Object? cc, Object? bcc, Object? replyTo, Map<String, String>? headers, List<Map<String, String>>? tags, List<Map<String, dynamic>>? attachments, Map<String, dynamic>? template}) → Map<String, dynamic>
Builds the JSON body for POST /api/v1/emails (Resend-compatible).
normalizeBaseUrl(String url) → String

Exceptions / Errors

MailoflyException
Thrown when the API returns a non-success status or the body is not valid JSON.