private void BugReportBtn_Click(object sender, EventArgs e) //Om man skriver ett problem som finns så skickas det direkt till företagets email. { BugReport.UserBugReport(loginEmail, BugReportTxt.Text); Search.Mail(MailTxt.Text); Outlook.Application app = new Outlook.Application(); Outlook.MailItem mailItem = app.CreateItem(Outlook.OlItemType.olMailItem); mailItem.Subject = "Bug report"; mailItem.To = "*****@*****.**"; mailItem.HTMLBody = "A new ticket has been created please check the error."; mailItem.Send(); MessageBox.Show("Sent!"); }
private void MailBtn_Click(object sender, EventArgs e) //Skicka mail ifall man glöm sitt lösenord. { Search.Mail(MailTxt.Text); Login.PasswordChanger(MailTxt.Text); MailTxt.Clear(); if (checker == 1) //Om det är 1 så finns det en användare och lösenordes skickas. { Outlook.Application app = new Outlook.Application(); Outlook.MailItem mailItem = app.CreateItem(Outlook.OlItemType.olMailItem); mailItem.Subject = "Password recovery"; mailItem.To = MailTxt.Text; mailItem.HTMLBody = "Your new password is: " + RecoveryNewPW + ". <br/> If you want to change the password, you need to do following:<ul><li>Login and go to settings tab.</li><li>Write old password in the first textbox.</li><li>Write the new password in the second textbox</li><li>Write the new password again in the third textbox</li><li>Done!</li></ul>"; mailItem.Send(); MessageBox.Show("Sent!"); } else //Annars så finns det ingen användare med den emailen. { MessageBox.Show("Email dosent exist!"); } }