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); } }
public int sendEmailToVerification(string email, string nazwisko, string imie) { if (email.Length > 0) { try { MailAddress m = new MailAddress(email); }catch(FormatException) { return 0; } int _random = _irandom.generateNumber(); var _mail = _idesc.create_description(imie, nazwisko, email, _random); _isendingMeailAndCheck.sendEmailInsertTimeVerification(_mail, imie, nazwisko, email); return _random; } else return 0; }