This is the HTML part
" }, "reply_to": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/FromHeader", "description": "Set the Reply-To: header" } ] }, "subject": { "type": [ "string", "null" ], "description": "Set the Subject: header" }, "text_body": { "type": [ "string", "null" ], "description": "If set, will be used to create a text/plain part", "example": "This is the plain text part" } } } ], "description": "The message content.\nCan either be a fully formed MIME message, or a json\nobject describing the MIME structure that should be created." }, "FromHeader": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string", "format": "email", "description": "The email address of the sender", "example": "sales@sender-example.com" }, "name": { "type": [ "string", "null" ], "description": "The displayable name of the sender", "example": "Sales" } }, "additionalProperties": false }, "HttpTraceHeaders": { "$ref": "#/components/schemas/TraceHeaders" }, "InjectV1Request": { "type": "object", "required": [ "envelope_sender", "recipients", "content" ], "properties": { "content": { "$ref": "#/components/schemas/Content", "description": "Specifies the message content. It can either be a string value or\na JSON object describing how to build a the message.\n\nIf a simple string is provided, it must be an RFC822 compliant\nmessage. If template substitutions are used in the request, then\nthe entire RFC822 message string is used as-is for the template;\nno message parsing or decoding is performed as part of template\nexpansion.\n\nAlternatively the content can be specified as a JSON object as\ndemonstrated in the docs for the `Content` type.\n\nWhen building a message, template substitutions are\napplied to the `text_body`, `html_body`,\n`amp_html_body` and `headers` fields.\n\nAttachments are not subject to template substitution." }, "deferred_generation": { "type": "boolean", "description": "{{since('2024.11.08-d383b033', inline=True)}}\n\nWhen set to true, the injection request will be queued\nand the actual generation and substitution will happen\nasynchronously with respect to the injection request.\nThe default mode of operation is to respond to the injection request only\nonce every message in the request has been enqueued to the internal queue\nsystem. This provides *back pressure* to the injection system and prevents\nthe service from being overwhelmed if the rate of ingress exceeds the\nmaximum rate of egress.\n\nThe result of this back pressure is that the latency of the injection request\ndepends on the load of the system.\n\nSetting `deferred_generation: true` in the request alters the processing flow:\ninstead of immediately expanding the request into the desired number of\nmessages and queueing them up, the injection request is itself queued up and\nprocessed asynchronously with respect to the incoming request.\n\nThis `deferred_generation` submission is typically several orders of magnitude\nfaster than the immediate generation mode, so it is possible to very very quickly\nqueue up large batches of messages this way.\n\nThe deferred generation requests are queued internally to a special queue\nnamed `generator.kumomta.internal` that will process them by spawning each\nrequest into the `httpinject` thread pool.\n\nYou will likely want and need to configure shaping to accomodate this queue\nfor best performance:\n\n```lua\n-- Locate this before any other helpers or modules that define\n-- `get_egress_path_config` event handlers in order for it to take effect\nkumo.on(\n 'get_egress_path_config',\n function(routing_domain, egress_source, site_name)\n if routing_domain == 'generator.kumomta.internal' then\n return kumo.make_egress_path {\n -- This is a good place to start, but you may want to\n -- experiment with 1/2, 3/4, or 1.5 times this to find\n -- what works best in your environment\n connection_limit = kumo.available_parallelism(),\n refresh_strategy = 'Epoch',\n max_ready = 80000,\n }\n end\n end\n)\n```\n\n!!! note\n It is possible to very quickly generate millions of queued messages when\n using `deferred_generation: true`. You may wish to look into configuring\n a rate limit to constrain the system appropriately for your environment.\n