I want to check if the From header contains the email address [email protected]:
if msg['From'] =='[email protected]':
count+=1
This does not add one to the count because the header actually contains 'YouTube [email protected]'.
How can I adapt my code so it adds one to the counter, checking that it contains '[email protected]' anywhere in the header?