public void SendDeadReport(int UserId, User FatherInfo)
 {
     var mailer = new DefaultMailer();
     var w = new OwnersByRecipientQuery(UserId, FatherInfo.Id).ExecuteNew2();
     for (int i = 0; i < w.Count; i++)
     {
         var msg = mailer.SendWitnessDeadReport(FatherInfo.FullName(), w[i].FirstName + " " + w[i].LastName, w[i].Email);
         msg.Send();
     }
 }
 public void Handle(User owner, RecipientAddModel form)
 {
     //TODO: No se puede agregar como beneficiario a uno mismo
     var user = this.Find(form.Email);
     if (user == null)
     {
         user = User.CreateDataheir(form.FirstName, form.LastName, null, null, form.Email, null, null, null, null, 0, 0, null, 0, System.DateTime.Now, 1, 0, null, false, false, false, true, false);
         Save(user);
         AddRecipientToOwner(owner.Id, user.Id);
         SendInvitation(owner.FullName(), user, "");
     }
     else
     {
         //user.AddRole(UserRoles.Dataheir);
         user.FirstName = form.FirstName;
         user.LastName = form.LastName;
         Update(user);
         //AddRecipientToOwner(owner.Id, user.Id);
         //TODO: Tambien enviar email indicando que ha sido agregado como testigo
     }
 }
 public void SendDataheirInfo(User FatherInfo, User dataheir)
 {
     //Sent Dataheir
     var mailer1 = new DefaultMailer();
     var msg1 = mailer1.SendDateToDataheir(dataheir.Email, FatherInfo.FullName(), dataheir.FirstName, FatherInfo.UserName, FatherInfo.Password);
     msg1.Send();
 }
 private static void SendInvitation(User owner, User witness, string message)
 {
     var mailer = new DefaultMailer();
     var msg = mailer.CreateAccountWitnessInvitation(witness.Email, witness.Id, witness.FirstName, owner.FullName(), message);
     msg.Send();
 }
 private static void SendInvitation(User owner, User dataheir, string message)
 {
     var mailer = new DefaultMailer();
     var msg = mailer.CreateAccountDataheirInvitation(dataheir.Email, dataheir.Id, dataheir.FirstName, owner.FullName(), message);
     msg.Send();
 }
 public void SendConfirmationEmail(User user)
 {
     var mailer = new DefaultMailer();
     var msg = mailer.NewAccountConfirmation(user.Email, user.Url, user.FullName());
     msg.Send();
 }