コード例 #1
0
ファイル: ServerObject.cs プロジェクト: cbguder/practises
 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.");
     }
 }
コード例 #2
0
ファイル: ServerObject.cs プロジェクト: cbguder/practises
 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.");
     }
 }