public bool sendEmailPasswordToExistUser(string emailUser) { var userTable = _infoAboutUser.GetInfoAboutUserForLogin(emailUser); var passwordDefault = _iregUser.changePass(userTable.pass_id == null ? 0 : int.Parse(userTable.pass_id.ToString())); var decsription = _ieEmailDescritpion.CreatEmailWithoutDescriptionAndRandomNumber( userTable.user_imie, userTable.user_nazwisko, emailUser, "Logowanie maraton", "*****@*****.**"); var result = _icreateMailMessage.createResponse(decsription, "Nazwa użytkownika: " + emailUser + " i hasło:" + passwordDefault + " logowania do panelu administracyjnego."); _iSmtpConfiguration.sendEmail(result); return(true); }
public int sendWelcomeEmail(string imie, string nazwisko, string email) { int result = -1; try { string mail_description = iend.createDescription(idataDescription.get_DataFoDescritpion(imie, nazwisko, email)); var confirmationDescription = iemailDescription.CreatEmailWithoutDescriptionAndRandomNumber(imie, nazwisko, email, "Potwierdzenie Rejestracji X Maraton Rowerowy Mszana 2019", email); var info = imail.createResponse(confirmationDescription, mail_description); result = isendingEmail.sendEmailInsertTimeVerification(info, imie, nazwisko, email); return(result); } catch (Exception ex) { addExceptionToBase(ex.Message + " " + email + " " + imie + " " + nazwisko, "sendWelcomeEmail"); return(result); } }