Im trying to make a program who will send a mail but when im trying to send it it only come up that im need to fix this problem:
COM Exception Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
Here is my code for this:
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!");
Im thankful for help! I know that this question alredy exists on thise site but i couldnt fix the problem trough the other ones.
