static void EnqueueMessage(QueueItem item) { //mailhost MailHost host = null; if (!MailHosts.TryGetValue(item.Label, out host)) { throw new MessageException(AcknowledgeStatus.InvalidMailHost, "Mail host not exists"); } if (item.Segments > 0 && (int)item.Priority > (int)Priority.Normal) { RemoteQueueServer.QueueManager[host.ChunkQueueName].Enqueue(item); return; } int batchId = item.Segments > 0 ? item.OperationId : item.MessageId; string path = host.GetBatchPath(batchId); MailHost.CreateDirectory(path); item.Save(path); }
public Mailer_Manager() { m_channels = MailHosts.GetChannels(); m_disterbuters = new Dictionary <string, Mail_Distrebuter>(); intervalManager = MailConfig.IntervalManager; }