Yes. But message:recipient() is not solve my use case.
Because when using the smtp_server_message_received event, every single message is passed through. We can’t group sets of messages like multiple To or CC.
Well, if you are looking to identify and track emails, you can use the Message-Id header.
but msg id is not unique. every email has different message id in a single message thread
@faithful-ostrich @optimistic-whale Please help me to solve this bcc issue
Hm, yeah. Not too sure about your use case, sorry ![]()
Ok @optimistic-whale Thanks for the support
@faithful-ostrich Is there any option to solve this
You have described a task, not a use case. What is your actual use case?
On a second thought, there’s a header called “References”. Read more about it: Cognitive Buffet: Understanding Email Headers, Part II - The Basics
References are not BCCs
I’m not exactly sure what you are asking to “solve”. What exactly are you trying to accomplish?
Yeah, they are not. I just mean they mentioned something about a message thread
KumoMTA is for bulk sending, threads are not really a bulk sending thing.
I suppose OP needs to describe their use case a bit more in detail. I’ve got no idea what they are trying to implement
References point to message IDs, not email addresses.
The server_recpt_to event will operate on each rcpt_to in a message and you can then manipulate them any way you like. Here, I just asked to print off the list of all the rcpt_to’s in a message injection. Only the first is a visible address the rest are BCCs.
I have no doubt that whatever OP wants to do is possible, I just do not understand the use case.
My task is to fetch all “to”,“cc”, and “bcc” in a message thread.
Then you can use get_all_named_header_values to get the TO and CC values,
And you can use the smtp_server_rcpt_to event to collect all the RCPT_TO values.
The ones that are not in the Header values are the BCCs.
And do what with those? Again sharing a real use case lets us give real advice.