private bool SendMail(UserVo userVo) { Emailer emailer = new Emailer(); EmailMessage email = new EmailMessage(); bool isMailSent = false; try { email.To.Add(userVo.Email); string name = userVo.FirstName + " " + userVo.MiddleName + " " + userVo.LastName; email.GetAdviserRegistrationMail(userVo.LoginId, Encryption.Decrypt(userVo.Password), name); isMailSent = emailer.SendMail(email); //Send a notification mail to Wealth ERP team. EmailMessage notificationMail = new EmailMessage(); notificationMail.GetAdviserRegistrationMailNotification(advisorVo.OrganizationName, advisorVo.City, advisorVo.MobileNumber, userVo.LoginId, userVo.Email, name); //notificationMail.GetAdviserRegistrationMail(userVo.LoginId, userVo.Password, name); emailer.SendMail(notificationMail); } catch (Exception ex) { throw ex; } return(isMailSent); }