<div dir="ltr"><br><br>On Fri, 23 Aug 2019 at 14:08, antonio taccetti <<a href="mailto:antonio.taccetti@gmail.com">antonio.taccetti@gmail.com</a>> wrote:<br>><br>> Scusate la domanda banale, sono neofita di Python 3.7,<br>> sto provando il codice  della pagina<br>> <a href="https://docs.python.org/3/library/email.examples.html?highlight=read%20mail">https://docs.python.org/3/library/email.examples.html?highlight=read%20mail</a><br>> First, let’s see how to create and send a simple text message (both the text content and the addresses may contain unicode characters):<br>><br>> Non riesco a capire perchè mi da l'errore:<br>> Traceback (most recent call last):<br>>   File "C:\Users\leona\AppData\Local\Programs\Python\Python37\Tools\scripts\posta\lists-Creare-inviare-messaggio-di-testo.py", line 13, in <module><br>>     with open(textfile) as fp:<br>> NameError: name 'textfile' is not defined<br>> Il file c'è ed è bnella stessa cartella Cosè che non capisco?<br>> Dov'è che sbaglio?<br><br><br>textfile e' una variabile, o ci metti il nome del file o la inizializzi da qualche parte con il nom del file che vuoi usare.<br>Il commento stesso dice<br><br># Open the plain text file whose name is in textfile for reading.<br><br>In pratica textfile deve essere <span class="gmail_default" style="font-size:small">inizi</span>alizzata con il nome del file<br><br><div style="font-size:small" class="gmail_default">Carlos</div>--<br>EZLN ... Para Todos Todo ... Nada para nosotros</div>