def enviar_correo(destinatario, asunto, cuerpo): email = EmailMessage() email.subject = asunto email.body = cuerpo email.to = destinatario email.connection = connection email.send()
def send_mail_ticket(request, subject, body, to): email = EmailMessage() email.subject = subject email.body = body email.to = [to] #email.attach_file("/home/romain/Downloads/clement.davin.jpeg") email.connection = get_connection() return email.send()
def enviar_correo(destinatario,asunto,cuerpo): email = EmailMessage() email.subject = asunto email.body = cuerpo email.to = destinatario email.connection = connection try: email.send() except: pass