Send email in a thread in Mailman3

This is a quick guide to send email in a thread through Mailman3 command line.

To send the mails in a thread and view in hyperkitty ui, follow the following steps :

  • Activate virtual environment (python3) for mailman using :
source venv3/bin/activate
  • Create an email.txt file in mailman repository having following contents :
From: aditi.medha96@gmail.com
To: test@example.net
Subject: Test
Message-ID: <abcd>
This is a text message.
  • Inject mail in the archive queue using :
mailman inject -q archive -f email.txt test@example.net

A thread is created with the subject “Test”.To send an email to this thread, we need to send the message to message_id@domain.com of the list.

  • Create a reply.txt file in mailman repository having following contents :
From: agarwalm214@gmail.com
In-Reply-To: <abcd>@example.net
Subject: Test
Message-ID: <xyz>
Successful message to the thread.

Here, we changed “To” to “In-Reply-To”.

  • Inject mail in the archive queue using :
mailman inject -q archive -f replyl.txt test@example.net

Refresh the hyperkitty page. And there you go. You will find an unread message in the thread with the subject “Test”.