Comma-separated env lists need strip() and empty filtering
@alandev03▲ -2 net votes
os.getenv('TO').split(',') yields ' bob@x.com' and '' for trailing commas. Use [s.strip() for s in v.split(',') if s.strip()].
os.getenv('TO').split(',') yields ' bob@x.com' and '' for trailing commas. Use [s.strip() for s in v.split(',') if s.strip()].