def verification():
global ver_pw
list_pw = []
email_list = []
email_list.append(email)
print(email_list)
for _ in range(0,4):
randomly = random.randint(0,1)
if randomly == 0:
letter = random.choice(letterslow)
else:
letter = random.choice(lettersupper)
list_pw.append(letter)
ver_pw = ''.join(map(str, list_pw))
text = "Herzlich wilkommen " + username + " bei Crypto Bank ihre verschlüsselte Bank, die Wert auf Sicherheit und Verschlüsselung legt.\n Bitte geben sie den Folgenden Verifizierungscode ein um Sicherzustellen, dass dies auch ihre Email Adresse ist." + ver_pw
mail.send_message(text, sender = '[email protected]', recipients=email_list, body="Verification")
return "mail sent"
At mail.sendmessage it gives me an error but when i change the variable text with 'test' it works fine i also tried subject=text . How can i assing a variable as paramenter usually it works fine but here not.
I found the error you cannot use \n