// menu drop down, load existing titles/salutations from db public void PopulateTitle() { ddlUserTitle.DataSource = DataAccessUser.getTitle(); //takes value from db ddlUserTitle.DataTextField = "title"; // wort das man sehen kann wird eingegeben ddlUserTitle.DataValueField = "title_Id"; // id vom typ user wird angegeben, sieht man nicht aber nuetzlich ddlUserTitle.DataBind(); }
// control if user already taken protected void CVUsername_ServerValidate(object source, ServerValidateEventArgs args) { args.IsValid = true; if (DataAccessUser.VerifyExistUser(txtUserName.Text)) { args.IsValid = false; } }
// menu drop down, load existing type of users from db public void PopulateTypeUser() { ddlUserType.DataSource = DataAccessUser.getTypeUser(); //takes value from db ddlUserType.DataTextField = "DescriptionTypUser"; // wort das man sehen kann wird eingegeben ddlUserType.DataValueField = "ID_Typ"; // id vom typ user wird angegeben, sieht man nicht aber nuetzlich ddlUserType.DataBind(); ddlUserType.Items.Remove(new ListItem { Value = "2", Text = "Administrator" }); // nicht admin auswahlbar }
// insert in the drop down list all existing users public void PopulateTypeUser() { //fuellt mit den vorhandenen type user rblTypeUserAssigned.DataSource = DataAccessUser.getTypeUser(); rblTypeUserAssigned.DataTextField = "DescriptionTypUser"; rblTypeUserAssigned.DataValueField = "ID_Typ"; rblTypeUserAssigned.DataBind(); rblTypeUserAssigned.Items.Remove(new ListItem { Value = "2", Text = "Administrator" }); }
public void writeConfigFile(long idtestcase) { Class.TestCase tc = DataAccess.DataAccessTestCase.getTestCase(idtestcase); List <GroupImage> listgroupImage = DataAccessTestCase.getAllImagesOfTestcase(idtestcase); string path = Constant.pathConfigFileTestcase; string listOfUsertypes = ""; List <Class.TypUser> Usertypes = DataAccessUser.GetTypeUserForTestCase(idtestcase); foreach (Class.TypUser user in Usertypes) { listOfUsertypes += user.ID_Typ + ","; } try { using (System.IO.StreamWriter file = new System.IO.StreamWriter(path + "\\" + tc.NameTestCase + "_" + idtestcase + ".cfg")) { string activeLearning = "off"; string scale = "continuous"; int totalAmountOfImages = 0; if (tc.DiskreteScale) { scale = "discrete"; } if (tc.ActiveLearning) { activeLearning = "on"; } file.WriteLine("Id:" + idtestcase + "; name:" + tc.NameTestCase + "; general info:" + tc.GeneralInfo + "; test question:" + tc.TestQuestion + "; scale type:" + scale + "; active learning:" + activeLearning + "; initial threshold:" + tc.initialThreshold + "; user interval:" + tc.userThreshold + "; database path:" + tc.dbPath + "; eligible user types: " + listOfUsertypes); file.WriteLine("IdGroup; Path; IsReference; IdGroupHasImage; PatientName"); foreach (GroupImage image in listgroupImage) { file.WriteLine(image.Idgroup + "; " + image.Path + "; " + image.IsReference + "; " + image.IdGroupHasImage + "; " + image.PatienteName + ";"); totalAmountOfImages++; } file.WriteLine("total amount of images in testcase: " + totalAmountOfImages); } } catch (Exception) { } }
// if click on login protected void btnLogin_Click(object sender, EventArgs e) { Class.User user = null; // variable: user, get existing user if exist try { user = DataAccessUser.checkPassword(txtUsername.Text, txtPassword.Text); } catch (Exception) { Response.Redirect("Login.aspx"); } if (user != null) { // user is available for the whole page Session["User"] = user; Response.Redirect("~/Default.aspx"); // change to welcome page } }
static BusinessUserObjects MapperBLL(DataAccessUser daUser) { DataAccessUser daUser = new DataAccessUser(); daUser.UserName = boUser.UserName; daUser.Password = boUser.Password; daUser.FirstName = boUser.FirstName; daUser.LastName = boUser.LastName; daUser.Email = boUser.Email; daUser.Birthdate = boUser.Birthdate; daUser.City = boUser.City; daUser.State = boUser.State; daUser.StreetAddress = boUser.StreetAddress; daUser.Zipcode = boUser.Zipcode; daUser.SecurityQuestion = boUser.SecurityQuestion; daUser.SecurityAnswer = boUser.SecurityAnswer; daUser.Arrival = boUser.Arrival; daUser.Depature = boUser.Depature; return(daUser); }
public void CreateDaUser(DataAccessUser customer) { SqlConnection lConnection = new SqlConnection(_connection); SqlCommand cmd = new SqlCommand("SP_CreateNewCustomer", lConnection); try { cmd.CommandType = CommandType.StoredProcedure; lConnection.Open(); cmd.Parameters.AddWithValue("@UserName", customer.UserName); cmd.Parameters.AddWithValue("@Password", customer.Password); cmd.Parameters.AddWithValue("@FirstName", customer.FirstName); cmd.Parameters.AddWithValue("@LastName", customer.LastName); cmd.Parameters.AddWithValue("@Email", customer.Email); cmd.Parameters.AddWithValue("@Birthdate", customer.Birthdate); cmd.Parameters.AddWithValue("@City", customer.City); cmd.Parameters.AddWithValue("@State", customer.State); cmd.Parameters.AddWithValue("@Address", customer.StreetAddress); cmd.Parameters.AddWithValue("@Zipcode", customer.Zipcode); cmd.Parameters.AddWithValue("@Question", customer.SecurityQuestion); cmd.Parameters.AddWithValue("@Answer", customer.SecurityAnswer); cmd.Parameters.AddWithValue("@Arrival", customer.Arrival); cmd.Parameters.AddWithValue("@Departure", customer.Depature); } catch (SqlException error) { string _ErrorLogFileLocation = @"C:\Users\admin2\Desktop\\ErrorLog.txt"; using (StreamWriter lwriter = new StreamWriter(_ErrorLogFileLocation, true)) { lwriter.WriteLine(error.Message); } } finally { lConnection.Close(); } }
// when click on button create user, eventArgs event of button protected void CreateUserButton_Click(object sender, EventArgs e) { Result result = new Result(); result.result = false; Class.User user = null; // if every control is false -> alles ok if (Page.IsValid) { // populate object and insert in db new user user = new Class.User(); user.Name = txtName.Text; user.Surname = txtSurname.Text; user.Password = txtPassword.Text; user.Username = txtUserName.Text; user.Email = txtEmail.Text; user.Type = Convert.ToInt32(ddlUserType.SelectedValue); user.titleId = Convert.ToInt32(ddlUserTitle.SelectedValue); user.YearsOfExperience = Convert.ToInt32(txtYearsExperience.Text); user.DateInsert = DateTime.Now; result = DataAccessUser.RegisterUser(user); DataAccessUser.writeUserList(); } else { } if (result.result) { DivSuccess.Visible = true; DivError.Visible = false; List <string> message = Constant.registerMail(txtName.Text, txtSurname.Text, txtUserName.Text, txtPassword.Text); MyEmail mail = new MyEmail(); mail.sendEmail(txtEmail.Text, message[0], message[1], Constant.includeAttachment); if (Constant.sendRegisteredAdmin) { List <string> messageAdmin = Constant.registerNotificationAdminMail(txtName.Text, txtSurname.Text, txtUserName.Text); mail.sendEmail(Constant.adminEmailAddress, messageAdmin[0], messageAdmin[1], false); } if (user != null) { // user is available for the whole page Session["User"] = user; Response.Redirect("~/Default.aspx"); // change to welcome page } } else { DivSuccess.Visible = false; DivError.Visible = true; lblError.Text = result.Message; } }
public void createUserFromDatabase(UserBusinessLogic boCustomer) { DataAccessUser daCustomer = MapperBLL(boCustomer); _dal.CreateDaUser(daCustomer); }
public RequestsController(DataAccessRequest dataForRequest, DataAccessUser dataForUser) { dataRequest = dataForRequest; dataUser = dataForUser; }
//private static readonly String apiBaseUrl = "http://*****:*****@trifork.com" }, { "Name", "Driving Notifier App" } } }, { "To", new JArray { new JObject { { "Email", user.Email }, { "Name", user.Email } } } }, { "Subject", "Welcome to Driving Notifier App!" }, { "TemplateLanguage", true }, { "HTMLPart", @"<!doctype html> <html xmlns='http://www.w3.org/1999/xhtml' xmlns:v='urn:schemas-microsoft-com:vml' xmlns:o='urn:schemas-microsoft-com:office:office'> <head> <title>Someone wants to add you!</title> <!--[if !mso]><!-- --> <meta http-equiv='X-UA-Compatible' content='IE=edge'> <!--<![endif]--> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> <meta name='viewport' content='width=device-width, initial-scale=1.0'> <style type='text/css'> #outlook a { padding: 0; } .ReadMsgBody { width: 100%; } .ExternalClass { width: 100%; } .ExternalClass * { line-height:100%; } body { margin: 0; padding: 0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } table, td { border-collapse:collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; } img { border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; } p { display: block; margin: 13px 0; } </style> <!--[if !mso]><!--> <style type='text/css'> @media only screen and (max-width:480px) { @-ms-viewport { width:320px; } @viewport { width:320px; } } </style> <!--<![endif]--> <!--[if mso]> <xml> <o:OfficeDocumentSettings> <o:AllowPNG/> <o:PixelsPerInch>96</o:PixelsPerInch> </o:OfficeDocumentSettings> </xml> <![endif]--> <!--[if lte mso 11]> <style type='text/css'> .outlook-group-fix { width:100% !important; } </style> <![endif]--> <style type='text/css'> @media only screen and (min-width:480px) { .mj-column-per-100 { width:100%!important; } } </style> </head> <body style='background: #F4F4F4;'> <div class='mj-container' style='background-color:#F4F4F4;'><!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0' width='600' align='center' style='width:600px;'> <tr> <td style='line-height:0px;font-size:0px;mso-line-height-rule:exactly;'> <![endif]--><div style='margin:0px auto;max-width:600px;'><table role='presentation' cellpadding='0' cellspacing='0' style='font-size:0px;width:100%;' align='center' border='0'><tbody><tr><td style='text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:20px 0px;padding-bottom:0px;padding-top:0px;'><!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0'> <tr> <td style='vertical-align:top;width:600px;'> <![endif]--><div class='mj-column-per-100 outlook-group-fix' style='vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;'><table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'><tbody><tr><td style='word-wrap:break-word;font-size:0px;padding:10px 25px;padding-top:0px;padding-bottom:0px;padding-right:0px;padding-left:0px;' align='center'><table role='presentation' cellpadding='0' cellspacing='0' style='border-collapse:collapse;border-spacing:0px;' align='center' border='0'><tbody><tr><td style='width:577px;'><img alt=' title=' height='auto' src='http://90p1.mjt.lu/tplimg/90p1/b/6u2s/1pwj.jpeg' style='border:none;border-radius:;display:block;font-size:13px;outline:none;text-decoration:none;width:100%;height:auto;' width='577'></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--> <!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0' width='600' align='center' style='width:600px;'> <tr> <td style='line-height:0px;font-size:0px;mso-line-height-rule:exactly;'> <![endif]--><div style='margin:0px auto;max-width:600px;background:#ffffff;'><table role='presentation' cellpadding='0' cellspacing='0' style='font-size:0px;width:100%;background:#ffffff;' align='center' border='0'><tbody><tr><td style='text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:20px 0px 20px 0px;'><!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0'> <tr> <td style='vertical-align:top;width:600px;'> <![endif]--><div class='mj-column-per-100 outlook-group-fix' style='vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;'><table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'><tbody><tr><td style='word-wrap:break-word;font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;' align='left'><div style='cursor:auto;color:#55575d;font-family:Arial, sans-serif;font-size:13px;line-height:22px;text-align:left;'><h1 style='font-size: 20px; font-weight: bold;'>WELCOME to Driving Notifier App!</h1></div></td></tr><tr><td style='word-wrap:break-word;font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;' align='left'><div style='cursor:auto;color:#55575d;font-family:Arial, sans-serif;font-size:13px;line-height:22px;text-align:left;'><p style='font-size: 13px; margin: 10px 0;'>Hello " + user.FullName + @" ,</p><p style='font-size: 13px; margin: 10px 0;'>From the Driving Notifier Team, we would like to give you our warmest welcome to our App. To start using Driving Notifier App you still need to verify your e-mail by clicking the next button:</p></div></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--> <!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0' width='600' align='center' style='width:600px;'> <tr> <td style='line-height:0px;font-size:0px;mso-line-height-rule:exactly;'> <![endif]--><div style='margin:0px auto;max-width:600px;background:#ffffff;'><table role='presentation' cellpadding='0' cellspacing='0' style='font-size:0px;width:100%;background:#ffffff;' align='center' border='0'><tbody><tr><td style='text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:20px 0px;padding-bottom:0px;padding-top:0px;'><!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0'> <tr> <td style='vertical-align:top;width:600px;'> <![endif]--><div class='mj-column-per-100 outlook-group-fix' style='vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;'><table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'><tbody><tr><td style='word-wrap:break-word;font-size:0px;padding:10px 25px;' align='center'><table role='presentation' cellpadding='0' cellspacing='0' style='border-collapse:separate;' align='center' border='0'><tbody><tr><td style='border:none;border-radius:3px;color:#ffffff;cursor:auto;padding:10px 25px;' align='center' valign='middle' bgcolor='#20a79c'><a href='" + urlVerification + @"' style='text-decoration:none;background:#20a79c;color:#ffffff;font-family:Arial, sans-serif;font-size:13px;font-weight:normal;line-height:120%;text-transform:none;margin:0px;' target='_blank'><b>Verify</b></a></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--> <!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0' width='600' align='center' style='width:600px;'> <tr> <td style='line-height:0px;font-size:0px;mso-line-height-rule:exactly;'> <![endif]--><div style='margin:0px auto;max-width:600px;background:#ffffff;'><table role='presentation' cellpadding='0' cellspacing='0' style='font-size:0px;width:100%;background:#ffffff;' align='center' border='0'><tbody><tr><td style='text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:20px 0px;'><!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0'> <tr> <td style='vertical-align:top;width:600px;'> <![endif]--><div class='mj-column-per-100 outlook-group-fix' style='vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;'><table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'><tbody><tr><td style='word-wrap:break-word;font-size:0px;padding:10px 25px;padding-top:0px;padding-bottom:0px;' align='left'><div style='cursor:auto;color:#55575d;font-family:Arial, sans-serif;font-size:13px;line-height:22px;text-align:left;'><p style='font-size: 13px; margin: 10px 0;'>If you have not registered and created a new account, please ignore this message and click <a target='_blank' href='" + urlDeclination + @"' style='color: rgb(32, 167, 156);'><span style='color:#20a79c'>here</span></a>.</p><p style='font-size: 13px; margin: 10px 0;'>THANK YOU for using Driving Notifier.</p><p style='font-size: 13px; margin: 10px 0;'> </p></div></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--> <!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0' width='600' align='center' style='width:600px;'> <tr> <td style='line-height:0px;font-size:0px;mso-line-height-rule:exactly;'> <![endif]--><div style='margin:0px auto;max-width:600px;'><table role='presentation' cellpadding='0' cellspacing='0' style='font-size:0px;width:100%;' align='center' border='0'><tbody><tr><td style='text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:20px 0px 20px 0px;'><!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0'> <tr> <td style='vertical-align:top;width:600px;'> <![endif]--><div class='mj-column-per-100 outlook-group-fix' style='vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;'><table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'><tbody><tr><td style='word-wrap:break-word;font-size:0px;padding:0px 20px 0px 20px;padding-top:0px;padding-bottom:0px;' align='center'><div style='cursor:auto;color:#55575d;font-family:Arial, sans-serif;font-size:11px;line-height:22px;text-align:center;'><p style='font-size: 13px; margin: 10px 0;'>This e-mail has been sent to [[EMAIL_TO]], <a href='https://www.youtube.com/watch?v=dQw4w9WgXcQ' style='color:inherit;text-decoration:none;' target='_blank'>click here to unsubscribe</a>.</p></div></td></tr><tr><td style='word-wrap:break-word;font-size:0px;padding:0px 20px 0px 20px;padding-top:0px;padding-bottom:0px;' align='center'><div style='cursor:auto;color:#55575d;font-family:Arial, sans-serif;font-size:11px;line-height:22px;text-align:center;'><p style='font-size: 13px; margin: 10px 0;'>DK</p></div></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--></div> </body> </html>" } } }); MailjetResponse response = await client.PostAsync(request); if (response.IsSuccessStatusCode) { Console.WriteLine(string.Format("Total: {0}, Count: {1}\n", response.GetTotal(), response.GetCount())); Console.WriteLine(response.GetData()); } else { Console.WriteLine(string.Format("StatusCode: {0}\n", response.StatusCode)); Console.WriteLine(string.Format("ErrorInfo: {0}\n", response.GetErrorInfo())); Console.WriteLine(response.GetData()); Console.WriteLine(string.Format("ErrorMessage: {0}\n", response.GetErrorMessage())); } }
public UsersController(DataAccessUser data) { dataUser = data; }
//private static readonly String apiBaseUrl = "http://*****:*****@trifork.com" }, { "Name", "Driving Notifier App" } } }, { "To", new JArray { new JObject { { "Email", user.Email }, { "Name", user.Email } } } }, { "Subject", "Reset Password: Driving Notifier App" }, { "TemplateLanguage", true }, { "HTMLPart", @"<!doctype html> <html xmlns='http://www.w3.org/1999/xhtml' xmlns:v='urn:schemas-microsoft-com:vml' xmlns:o='urn:schemas-microsoft-com:office:office'> <head> <title>Someone wants to add you!</title> <!--[if !mso]><!-- --> <meta http-equiv='X-UA-Compatible' content='IE=edge'> <!--<![endif]--> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> <meta name='viewport' content='width=device-width, initial-scale=1.0'> <style type='text/css'> #outlook a { padding: 0; } .ReadMsgBody { width: 100%; } .ExternalClass { width: 100%; } .ExternalClass * { line-height:100%; } body { margin: 0; padding: 0; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } table, td { border-collapse:collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; } img { border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; } p { display: block; margin: 13px 0; } </style> <!--[if !mso]><!--> <style type='text/css'> @media only screen and (max-width:480px) { @-ms-viewport { width:320px; } @viewport { width:320px; } } </style> <!--<![endif]--> <!--[if mso]> <xml> <o:OfficeDocumentSettings> <o:AllowPNG/> <o:PixelsPerInch>96</o:PixelsPerInch> </o:OfficeDocumentSettings> </xml> <![endif]--> <!--[if lte mso 11]> <style type='text/css'> .outlook-group-fix { width:100% !important; } </style> <![endif]--> <style type='text/css'> @media only screen and (min-width:480px) { .mj-column-per-100 { width:100%!important; } } </style> </head> <body style='background: #F4F4F4;'> <div class='mj-container' style='background-color:#F4F4F4;'><!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0' width='600' align='center' style='width:600px;'> <tr> <td style='line-height:0px;font-size:0px;mso-line-height-rule:exactly;'> <![endif]--><div style='margin:0px auto;max-width:600px;'><table role='presentation' cellpadding='0' cellspacing='0' style='font-size:0px;width:100%;' align='center' border='0'><tbody><tr><td style='text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:20px 0px;padding-bottom:0px;padding-top:0px;'><!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0'> <tr> <td style='vertical-align:top;width:600px;'> <![endif]--><div class='mj-column-per-100 outlook-group-fix' style='vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;'><table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'><tbody><tr><td style='word-wrap:break-word;font-size:0px;padding:10px 25px;padding-top:0px;padding-bottom:0px;padding-right:0px;padding-left:0px;' align='center'><table role='presentation' cellpadding='0' cellspacing='0' style='border-collapse:collapse;border-spacing:0px;' align='center' border='0'><tbody><tr><td style='width:577px;'><img alt=' title=' height='auto' src='http://90p1.mjt.lu/tplimg/90p1/b/6vm8/1hks.jpeg' style='border:none;border-radius:;display:block;font-size:13px;outline:none;text-decoration:none;width:100%;height:auto;' width='577'></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--> <!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0' width='600' align='center' style='width:600px;'> <tr> <td style='line-height:0px;font-size:0px;mso-line-height-rule:exactly;'> <![endif]--><div style='margin:0px auto;max-width:600px;background:#ffffff;'><table role='presentation' cellpadding='0' cellspacing='0' style='font-size:0px;width:100%;background:#ffffff;' align='center' border='0'><tbody><tr><td style='text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:20px 0px 20px 0px;'><!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0'> <tr> <td style='vertical-align:top;width:600px;'> <![endif]--><div class='mj-column-per-100 outlook-group-fix' style='vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;'><table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'><tbody><tr><td style='word-wrap:break-word;font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;' align='left'><div style='cursor:auto;color:#55575d;font-family:Arial, sans-serif;font-size:13px;line-height:22px;text-align:left;'><h1 style='font-size: 20px; font-weight: bold;'> Driving Notifier App: Password Reset</h1></div></td></tr><tr><td style='word-wrap:break-word;font-size:0px;padding:0px 25px 0px 25px;padding-top:0px;padding-bottom:0px;' align='left'><div style='cursor:auto;color:#55575d;font-family:Arial, sans-serif;font-size:13px;line-height:22px;text-align:left;'><p style='font-size: 13px; margin: 10px 0;'>Hello,</p><p style='font-size: 13px; margin: 10px 0;'>We have noticed that you want to reset your password for accessing the App. For doing so, you can use the following code and then update your password:</p></div></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--> <!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0' width='600' align='center' style='width:600px;'> <tr> <td style='line-height:0px;font-size:0px;mso-line-height-rule:exactly;'> <![endif]--><div style='margin:0px auto;max-width:600px;background:#ffffff;'><table role='presentation' cellpadding='0' cellspacing='0' style='font-size:0px;width:100%;background:#ffffff;' align='center' border='0'><tbody><tr><td style='text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:20px 0px;padding-bottom:0px;padding-top:0px;'><!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0'> <tr> <td style='vertical-align:top;width:600px;'> <![endif]--><div class='mj-column-per-100 outlook-group-fix' style='vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;'><table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'><tbody><tr><td style='word-wrap:break-word;font-size:0px;padding:10px 25px;padding-top:0px;padding-bottom:0px;' align='left'><div style='cursor:auto;color:#55575d;font-family:Arial, sans-serif;font-size:13px;line-height:24px;text-align:left;'><p style='font-size: 13px; text-align: center; margin: 10px 0;'><span style='font-family:Lucida Console,Helvetica,Arial,sans-serif'>PASSWORD CODE: " + code + @"</span></p></div></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--> <!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0' width='600' align='center' style='width:600px;'> <tr> <td style='line-height:0px;font-size:0px;mso-line-height-rule:exactly;'> <![endif]--><div style='margin:0px auto;max-width:600px;background:#ffffff;'><table role='presentation' cellpadding='0' cellspacing='0' style='font-size:0px;width:100%;background:#ffffff;' align='center' border='0'><tbody><tr><td style='text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:20px 0px;'><!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0'> <tr> <td style='vertical-align:top;width:600px;'> <![endif]--><div class='mj-column-per-100 outlook-group-fix' style='vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;'><table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'><tbody><tr><td style='word-wrap:break-word;font-size:0px;padding:10px 25px;padding-top:0px;padding-bottom:0px;' align='left'><div style='cursor:auto;color:#55575d;font-family:Arial, sans-serif;font-size:13px;line-height:22px;text-align:left;'><p style='font-size: 13px; margin: 10px 0;'> </p><p style='font-size: 13px; margin: 10px 0;'>You can generate a new code as many times as you need it, and later you can reset you password again through the Reset Password section in the main view of our App.</p><p style='font-size: 13px; margin: 10px 0;'>Best regards,</p><p style='font-size: 13px; margin: 10px 0;'>Driving Notifier App</p><p style='font-size: 13px; margin: 10px 0;'> </p></div></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--> <!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0' width='600' align='center' style='width:600px;'> <tr> <td style='line-height:0px;font-size:0px;mso-line-height-rule:exactly;'> <![endif]--><div style='margin:0px auto;max-width:600px;'><table role='presentation' cellpadding='0' cellspacing='0' style='font-size:0px;width:100%;' align='center' border='0'><tbody><tr><td style='text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:20px 0px 20px 0px;'><!--[if mso | IE]> <table role='presentation' border='0' cellpadding='0' cellspacing='0'> <tr> <td style='vertical-align:top;width:600px;'> <![endif]--><div class='mj-column-per-100 outlook-group-fix' style='vertical-align:top;display:inline-block;direction:ltr;font-size:13px;text-align:left;width:100%;'><table role='presentation' cellpadding='0' cellspacing='0' width='100%' border='0'><tbody><tr><td style='word-wrap:break-word;font-size:0px;padding:0px 20px 0px 20px;padding-top:0px;padding-bottom:0px;' align='center'><div style='cursor:auto;color:#55575d;font-family:Arial, sans-serif;font-size:11px;line-height:22px;text-align:center;'><p style='font-size: 13px; margin: 10px 0;'>This e-mail has been sent to [[EMAIL_TO]], <a href='https://www.youtube.com/watch?v=dQw4w9WgXcQ' style='color:inherit;text-decoration:none;' target='_blank'>click here to unsubscribe</a>.</p></div></td></tr><tr><td style='word-wrap:break-word;font-size:0px;padding:0px 20px 0px 20px;padding-top:0px;padding-bottom:0px;' align='center'><div style='cursor:auto;color:#55575d;font-family:Arial, sans-serif;font-size:11px;line-height:22px;text-align:center;'><p style='font-size: 13px; margin: 10px 0;'>DK</p></div></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--></td></tr></tbody></table></div><!--[if mso | IE]> </td></tr></table> <![endif]--></div> </body> </html>" } } }); MailjetResponse response = await client.PostAsync(request); if (response.IsSuccessStatusCode) { Console.WriteLine(string.Format("Total: {0}, Count: {1}\n", response.GetTotal(), response.GetCount())); Console.WriteLine(response.GetData()); } else { Console.WriteLine(string.Format("StatusCode: {0}\n", response.StatusCode)); Console.WriteLine(string.Format("ErrorInfo: {0}\n", response.GetErrorInfo())); Console.WriteLine(response.GetData()); Console.WriteLine(string.Format("ErrorMessage: {0}\n", response.GetErrorMessage())); } }