public static void SendApprovalRejectionMail2(decimal authId, string eventType, string recordStatus, string formName, string rejectionReason) { try { var _repo = new DapperGeneralSettings(); var dg = _repo.GetApprovers_Mail_Email(authId); if (dg.Count <= 0) { return; } //List<EmailObj> dg = new List<EmailObj>(); //dg.Add(new EmailObj() //{ // Email = makerEmail, //}); string eventMsg = recordStatus == approve?string.Format("Record Approved Successfully") : "Record Rejected"; var mail = NotificationSystem.SendEmail(new EmailMessage() { EmailAddress = dg, emailSubject = "Approval/Rejection Status.", EmailContent = new EmailerNotification().PopulateBody(dg[0].FULLNAME, "#", eventMsg, "", DateTime.Now), EntryDate = DateTime.Now, HasAttachment = false }); } catch { } }
public static void SendMerchantUploadApprovalRejectionMail(string makerId, string eventType, string recordStatus, string formName, string rejectionReason, string batchId, string instInputerFullName, List <EmailObj> instEmail, int?InitiatorInstitutionId) { try { var _repo = new DapperGeneralSettings(); var lst = new List <EmailObj>(); var dg = _repo.GetGroupEmail(1, false, false).FirstOrDefault(); if (dg != null) { var gt = SplitGroupEmail(dg.EMAIL); if (gt.Count != 0) { lst.AddRange(gt); } } if (instEmail != null && instEmail.Count != 0) { lst.AddRange(instEmail); //_repo.GetBusinessTeamEmail(makerId); } if (lst.Count <= 0) { return; } // get institutionName var instName = ""; if (InitiatorInstitutionId != null && InitiatorInstitutionId != 0) { var rr = _repo.GetInstitutionName(InitiatorInstitutionId.GetValueOrDefault()); if (rr != null) { instName = rr.INSTITUTION_NAME; } } var inputName = instName; //= ""; // string.Concat(instName,"|", instInputerFullName ?? ""); string eventMsg = recordStatus == approve?string.Format("Approval of #{0} Merchant registeration ", batchId) : string.Format("Decline of #{0} Merchant registeration", batchId); var mail = NotificationSystem.SendEmail(new EmailMessage() { EmailAddress = lst, emailSubject = eventMsg, EmailContent = new EmailerNotification().PopulateMerchantBody(batchId, inputName, eventType, rejectionReason, DateTime.Now), EntryDate = DateTime.Now, HasAttachment = false }); } catch { } }
void SendUploadErrorNotification(string message, int record, string batchid, string fullName) { List <EmailObj> lst = new List <EmailObj>(); lst.Add(new EmailObj() { Email = userEmail, RoleId = roleId }); var mail = NotificationSystem.SendEmail(new EmailMessage() { EmailAddress = lst, emailSubject = "Upload Notififcation.", EmailContent = new EmailerNotification().PopulateUploadErrorMessage(message, record, batchid, fullName), EntryDate = DateTime.Now, HasAttachment = false }); }
public static void SendToApprover(string fullName, string eventMsg, string approverId) { try { IDapperGeneralSettings _repo = new DapperGeneralSettings(); var dg = _repo.GetApproverIdEmail(approverId); if (dg.Count > 0) { var mail = NotificationSystem.SendEmail(new EmailMessage() { EmailAddress = dg, emailSubject = "Authorization required.", EmailContent = new EmailerNotification().PopulateBody(fullName, "#", eventMsg, "", DateTime.Now), EntryDate = DateTime.Now, HasAttachment = false }); } } catch (Exception ex) { } }
public static void SendForAuthorization(int menuid, string fullName, string deptCode, int userinstitutionItbid, string eventMsg) { try { IDapperGeneralSettings _repo = new DapperGeneralSettings(); var dg = _repo.GetAuthorizeEmailList(menuid, deptCode, userinstitutionItbid); if (dg.Count > 0) { var mail = NotificationSystem.SendEmail(new EmailMessage() { EmailAddress = dg, emailSubject = "Authorization required.", EmailContent = new EmailerNotification().PopulateBody(fullName, "#", eventMsg, "", DateTime.Now), EntryDate = DateTime.Now, HasAttachment = false }); } } catch (Exception ex) { } }
NotificationSystem.EmailResponse SendMailToUser(String email, string userName, string Password, string FullName) { //var _repo = new Dapper.Data.DapperGeneralSettings(); //var dg = _repo.GetEmailList(menuid); var dg = new List <EmailObj>(); dg.Add(new EmailObj() { RoleId = 0, Email = email }); var mail = NotificationSystem.SendEmail(new EmailMessage() { EmailAddress = dg, // FromAddress = emailaddress, // SenderId = rec.SenderEmail, emailSubject = "Password Reset.", //user = "", EmailContent = new EmailerNotification().PopulateUserBody(userName, "#", Password, FullName), EntryDate = DateTime.Now, HasAttachment = false }); return(mail); }