private void AddGiftCode(GiftCode code, string type = "random") { Manager.Database.DoActionAsync(db => { var key = db.GenerateGiftcode(code.ToJson(), Account.AccountId); Player.SendInfo($"You have received a new GiftCode: {key}\nRedeem it at: {Program.Settings.GetValue("serverDomain")}/GiftCode.html or\n type /giftcode to scan it with your mobile via qr code"); }); }
private void AddGiftCode(GiftCode code) { Manager.Database.DoActionAsync(db => { var key = db.GenerateGiftcode(code.ToJson(), Account.AccountId); //var message = new MailMessage(); //message.To.Add(Account.Email); //message.IsBodyHtml = true; //message.Subject = "You received a new GiftCode"; //message.From = new MailAddress(Program.Settings.GetValue<string>("serverEmail", "")); //message.Body = "<center>Your giftcode is: " + code + "</br> Check the items in your giftcode <a href=\"" + Program.Settings.GetValue<string>("serverDomain", "localhost") + "/CheckGiftCode.html\" target=\"_blank\">here</a> or redeem the code <a href=\"" + Program.Settings.GetValue<string>("serverDomain", "localhost") + "/RedeemGiftCode.html\" target=\"_blank\">here</a></center>"; //Program.SendEmail(message); Player.SendInfo($"You have received a new GiftCode: {key}\nRedeem it at: {Program.Settings.GetValue("serverDomain")}/GiftCode.html or\n type /giftcode to scan it with your mobile via qr code"); }); }