Closed henricook closed 1 year ago
The actual target address is only known in the SMTP context. It does not survive 100% for mail access. The best bet you have is:
So, in short, there is no 100% perfect way of detecting that address. If the recipient was a BCC address, then depending on the email servers, it might be that there is no indication whatsoever in the message about the recipient.
Is your feature request related to a problem? Please describe. When an email is addressed to two or more people e.g.
alice@blah.com, bob@blah.com, charlie@blah.com
and I am parsing the email that one of them received, I'd like to know which one. Currently I can only get the contents of theto
field which doesn't tell me who the receiver of this specific message is.Describe the solution you'd like I thought that
delivered-to
might achieve this for me but it seems not. I can see that the data I want is in thereceived
header and I could try and parse it out myself but I don't know if it's uniform and I'm hoping the creators of this library might 🙏🏻For example, as above, when I'm looking at the email the Alice received with all three people in the
to
field, I can see in the email body:I'd like to be able to know that the email I'm parsing was for
alice@blah.com
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.