Files
kumomta/docs/reference/kumo/make_message.md
2025-10-07 07:38:10 +01:00

1021 B

tags
tags
message

kumo.make_message

MSG = kumo.make_message(SENDER, RECIPIENT, BODY)

{{since('2025.10.06-5ec871ab')}}

Constructs a new Message object with the specified SENDER, RECIPIENT and BODY.

make_message was created (in earlier versions of kumomta) primarily for testing purposes, but is now provided for use together with kumo.inject_message to facilitate more advanced workflows.

SENDER is expected to be the envelope-from address.

RECIPIENT is expected to be the envelope-to address.

BODY is expected to be the appropriately formatted body payload; this is usually a MIME message. The body should be formatted using canonical CRLF line endings.

The message created by make_message exists solely in memory until you explicitly indicate that you want something to happen to it. If you intend for kumomta to deliver the message, you should call kumo.inject_message to enqueue the message for delivery.