Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a non-deprecated equivalent of rfc822.AddressList?

I need something like rfc822.AddressList to parse, say, the content of the "TO" header field of an email into individual addresses. Since rfc822 is deprecated in favor of the email package, I looked for something similar there but couldn't find anything. Does anyone know what I'm supposed to use instead?

Thanks!

like image 683
Chung Wu Avatar asked Nov 03 '10 06:11

Chung Wu


1 Answers

Oh it's email.utils.getaddresses. Just make sure to call it with a list.

like image 128
Chung Wu Avatar answered Sep 30 '22 19:09

Chung Wu