[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openldap-bugs
Subject:    [Issue 9193] HTML in mailing list description
From:       openldap-its () openldap ! org
Date:       2024-03-19 19:58:33
Message-ID: bug-9193-2-r4vqcKtLkK () http ! bugs ! openldap ! org/
[Download RAW message or body]

https://bugs.openldap.org/show_bug.cgi?id=9193

--- Comment #4 from gerlin@post.com ---
Ejemplo escolar

def enviar_correo(asunto, mensaje, lista_destinatarios):

  # Importar la librería smtplib
  import smtplib

  # Crear un objeto SMTP
  smtp_obj = smtplib.SMTP('smtp.gmail.com', 587)

  # Iniciar la sesión SMTP
  smtp_obj.starttls()
  smtp_obj.login('correo_usuario', 'contrasena_usuario')

  # Enviar el correo electrónico
  smtp_obj.sendmail('correo_usuario', lista_destinatarios, f'Subject:
{asunto}\n{mensaje}')

  # Cerrar la sesión SMTP
  smtp_obj.quit()


# Ejemplo de uso
enviar_correo(
  asunto='Tarea de matemáticas',
  mensaje='Hola a todos, les recuerdo que la tarea de matemáticas se debe
entregar mañana.',
  lista_destinatarios=['estudiante1@correo.com', 'estudiante2@correo.com']
)

-- 
You are receiving this mail because:
You are on the CC list for the issue.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic