Ejemplo n.º 1
0
 public bool EnviarCorreo(YanapayEmail email)
 {
     try
     {
         GmailAPI.ConectarAPI(email);
         return(true);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message.ToString());
         return(false);
     }
 }
Ejemplo n.º 2
0
 public string EnviarCorreoString(string subject, string body, string recipient)
 {
     try
     {
         YanapayEmail email = new YanapayEmail()
         {
             FromAddress  = "*****@*****.**",
             ToRecipients = recipient,
             Subject      = subject,
             Body         = body,
             IsHtml       = false
         };
         GmailAPI.ConectarAPI(email);
         return("enviado");
     }
     catch (Exception ex)
     {
         return(ex.Message.ToString());
     }
 }