Ejemplo n.º 1
0
 private void SendMail(String email, AESInfo aesInfo, String bodyMsg)
 {
     String macPassword_encrypted = EncryptMACPass(email, aesInfo);
     String subject = "PractiSES notification";
     StringBuilder body = new StringBuilder(bodyMsg);
     body.AppendLine();
     body.AppendLine(Crypto.BeginMessage);
     body.AppendLine();
     body.AppendLine(macPassword_encrypted);
     body.AppendLine(Crypto.EndMessage);
     Email mailer = new Email(email, subject, body.ToString());    //recepient, subject, body
     if (mailer.Send())
     {
         ActionLog_Write(email + ": Mail sent.");
         Console.WriteLine(email + ": Mail sent.");
     }
 }
Ejemplo n.º 2
0
 private void ErrorMail(String email)
 {
     String subject = "PractiSES";
     String body = "Your answers are not correct.";
     Email mailer = new Email(email, subject, body);    //recepient, subject, body
     if (mailer.Send())
     {
         ActionLog_Write(email + ": Warning mail sent.");
         Console.WriteLine(email + ": Warning mail sent.");
     }
 }