Skip to content

Instantly share code, notes, and snippets.

@2624789
Last active November 21, 2015 19:31
Show Gist options
  • Save 2624789/4234fd8299eaaa4f455d to your computer and use it in GitHub Desktop.
Save 2624789/4234fd8299eaaa4f455d to your computer and use it in GitHub Desktop.
Enviar correo sin asunto utilizando python
import smtplib
# Creamos la conexión con el servidor
sesion_smtp = smtplib.SMTP('smtp.gmail.com', 587)
# Ciframos la conexión
sesion_smtp.starttls()
# Iniciamos sesión en el servidor
sesion_smtp.login('[email protected]','una contraseña segura')
# Creamos el mensaje
mensaje = 'Enviando correos desde la Raspberry'
# Enviamos el mensaje
sesion_smtp.sendmail('[email protected]', '[email protected]', mensaje)
# Cerramos la conexión
sesion_smtp.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment