private void SendServiceAnniversaryWishInAdvance(EmployeeProfile emp) { string name = emp.EmpName; string email = DecorateEmailFromAlias(emp.Alias); string yearsWorking = (DateTime.Now.Year - emp.DateOfJoining.Year).ToString(); Outlook.MailItem mailItem = (Outlook.MailItem) this.Application.CreateItem(Outlook.OlItemType.olMailItem); mailItem.Subject = "WISH " + name + " SERVICE ANNIVERSARY IN ADVANCE!!!"; mailItem.To = email; mailItem.HTMLBody = "<HTML>Hey " + "<br><h2>Do you want to wish " + name + " in advance as you may not wish on weekend???</h2>" + "<br><br><h2>" + emp.EmpName + "'s SERVICE ANNIVERSARY!</h2><br><br>" + "<h4>Name: " + emp.EmpName + "<br>Joining Date: " + emp.DateOfJoining.ToString("dd-MMMM-yyyy") + "<br><br>" + name + " has completed " + yearsWorking + " years working with us!" + "</h4><br><br>"; mailItem.Importance = Outlook.OlImportance.olImportanceLow; mailItem.Display(false); }
private void SendTomorrowBirthdaysReminderToManager(EmployeeProfile emp) { Outlook.MailItem mailItem = (Outlook.MailItem) this.Application.CreateItem(Outlook.OlItemType.olMailItem); mailItem.Subject = "REMINDER!! Birthday -> " + emp.EmpName; mailItem.To = Application.Session.CurrentUser. AddressEntry.GetExchangeUser().PrimarySmtpAddress; mailItem.HTMLBody = "<HTML><h4>Hey</h4> " + "<br><br><h2>" + emp.EmpName + "'s BIRTHDAY!</h2><br><br>" + "<h4>Name: " + emp.EmpName + "<br>Birth Date: " + emp.DateOfBirthday.ToString("dd-MMMM") + "</h4><br><br>"; mailItem.Importance = Outlook.OlImportance.olImportanceHigh; //mailItem.Display(false); mailItem.Send(); }
private void SendBirthDayWishForToday(EmployeeProfile emp) { string name = emp.EmpName; string email = DecorateEmailFromAlias(emp.Alias); Outlook.MailItem mailItem = (Outlook.MailItem) this.Application.CreateItem(Outlook.OlItemType.olMailItem); mailItem.Subject = "WISH " + name + " HAPPY BIRTHDAY TODAY!!!"; mailItem.To = email; mailItem.HTMLBody = "<HTML>Hey " + "<br><br><h2>" + emp.EmpName + "'s BIRTHDAY!</h2><br><br>" + "<h4>Name: " + emp.EmpName + "<br>Birthday: " + emp.DateOfBirthday.ToString("dd-MMMM") + "</h4><br><br>"; mailItem.Importance = Outlook.OlImportance.olImportanceLow; mailItem.Display(false); }
private void SendBirthdayWishInAdvance(EmployeeProfile emp) { string name = emp.EmpName; string email = DecorateEmailFromAlias(emp.Alias); Outlook.MailItem mailItem = (Outlook.MailItem) this.Application.CreateItem(Outlook.OlItemType.olMailItem); mailItem.Subject = "WISH " + name + " HAPPY BIRTHDAY IN ADVANCE!!!"; mailItem.To = email; mailItem.HTMLBody = "<HTML>Hey " + "<br><h2>Do you want to wish " + name + " in advance as you may not wish on weekend???</h2>" + "<br><br><h2>" + emp.EmpName + "'s BIRTHDAY!</h2><br><br>" + "<h4>Name: " + emp.EmpName + "<br>Birthday: " + emp.DateOfBirthday.ToString("dd-MMMM") + "</h4><br><br>"; mailItem.Importance = Outlook.OlImportance.olImportanceLow; mailItem.Display(false); }
private void SendTomorrowServiceDeliveryReminderToManager(EmployeeProfile emp) { Outlook.MailItem mailItem = (Outlook.MailItem) this.Application.CreateItem(Outlook.OlItemType.olMailItem); mailItem.Subject = "REMINDER!! Service Delivery -> " + emp.EmpName; mailItem.To = Application.Session.CurrentUser. AddressEntry.GetExchangeUser().PrimarySmtpAddress; mailItem.HTMLBody = "<HTML>Hey " + "<br><br><h2>" + emp.EmpName + "'s SERVICE ANNIVERSARY!</h2><br><br>" + "<h4>Name: " + emp.EmpName + "<br>Joining Date: " + emp.DateOfJoining.Date.ToString("dd-MMMM-yyyy") + "</h4><br><br>" + "It's been " + (DateTime.Now.Year - emp.DateOfJoining.Year).ToString() + " successful years!"; mailItem.Importance = Outlook.OlImportance.olImportanceHigh; //mailItem.Display(false); mailItem.Send(); }