17 December, 2010
This week I created a Python script to:
To meet this objective I have created the program in the file send-attachment.py and the configuration variables in conf.py. By changing the values in conf.py We can send the file containing the desired email addresses (to_addr) pattern (pattern) that We need. Failure to find any file with the pattern entered, the program sends an email to the address (alert) indicated to warn of the problem.
Sending email is done through an authenticated account (from_addr) on the same server SMTP (EMAIL_SERVER). That is why I recommend running the script with secure configuration file with read-only permissions for the user running: chmod 600 conf.py.
Next the files:
Greetings!
© 2022 carlessanagustin.com | Legal Note | Developed by Carles San Agustin from original theme
Gridly
Me da un error en esta linea,
for filename0 in filenames:
Hola Juan Carlos,
Esta entrada es del 2010 y en esa época no tenia los recursos que tengo ahora. He actualizado la entrada para solucionar este problema.
Puedes encontrar el código encima de estas lineas y en mi Gist:
Gist
Saludos,
c.