static public void SendNotification(Activity activity, JsonObject sendTo, string title, string text) { var content = EMailContentBuilder.SendNotificationContent(activity.Project, activity, title, text); FixedList <Person> contacts = GetContacts(sendTo, "registered"); SendEmail(content, contacts); string[] additional = GetAddresses(sendTo, "additional"); SendEmail(content, additional); }
static public void ActivityAssigned(Activity activity) { if (activity.Deadline == ExecutionServer.DateMaxValue) { return; } var content = EMailContentBuilder.UserAssignedActivityContent(activity.Project, activity, (Person)activity.Responsible); SendEmail(content, (Person)activity.Responsible); }
public async System.Threading.Tasks.Task SendPersonalActivitiesEmail(Project project, Person sendTo) { Assertion.Require(project, "project"); Assertion.Require(sendTo, "sendTo"); FixedList <Activity> activities = MessagingUtilities.GetUserUpcomingActivities(project, sendTo); if (activities.Count == 0) { return; } EMailContent content = EMailContentBuilder.UserAssignedActivityContent(project, activities[0], sendTo); await SendEmail(content, sendTo); }
public async System.Threading.Tasks.Task SendByThemeSummaryEmail(Project project, Person sendTo) { Assertion.Require(project, "project"); Assertion.Require(sendTo, "sendTo"); FixedList <Activity> activities = MessagingUtilities.GetAllUpcomingActivities(project); if (activities.Count == 0) { return; } EMailContent content = EMailContentBuilder.SendByThemeSummaryEmail(project, activities, sendTo); await SendEmail(content, sendTo); }
static public void RemindActivity(Activity activity, JsonObject sendTo) { EmpiriaLog.Critical(sendTo.ToString()); if (activity.Deadline == ExecutionServer.DateMaxValue) { return; } var content = EMailContentBuilder.RemindActivityContent(activity.Project, activity); FixedList <Person> contacts = GetContacts(sendTo, "sendAlertsTo"); SendEmail(content, contacts); string[] additional = GetAddresses(sendTo, "sendAlertsToEMails"); SendEmail(content, additional); }