I'm able to send emails using smtplib
with ease. What I'm struggling with is reading the actual headers that were sent one. Specifically, I'm looking to read the Message-ID
and References
.
I thought at first that sendmail()
would return them, but it does not.
Found that I'm able to redirect smtpilb.stderr
to my own function and parse out the data that I need. Is there a better way that would allow me to do say:
headers['References']