Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- import smtplib
- def enviar(nombre, destinatario):
- msg = '''
- Hola %s''' % nombre
- # Datos
- # Cuenta desde donde se enviara el correo
- username = 'jose.ver4@gmail.com'
- # Contraseña de la cuenta que emite correo
- password = 'slqiqlkgyeifcora'
- # Enviando el correo
- server = smtplib.SMTP('smtp.gmail.com:587')
- server.starttls()
- server.login(username, password)
- server.sendmail(username, destinatario, msg)
- server.quit()
- def nombre(dic):
- return (dic['Nombre'],dic['Correo'])
- #enviar(nombre.encode('utf-8'), correo.encode('utf-8'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement