Exemplo n.º 1
0
 void OnReceiveMessage(object sender, ReceiveMessageEventArgs e)
 {
     lock (_Messages)
     {
         _Messages.Add(e.Message);
     }
 }
 void OnReceiveMessage(object sender, ReceiveMessageEventArgs e)
 {
     lock (_Messages)
     {
         _Messages.Add(e.Message);
     }
 }
Exemplo n.º 3
0
        protected virtual void OnReceiveMessage(object sender, ReceiveMessageEventArgs e)
        {
            var msg        = e.Message;
            var saveToPath = Path.Combine(this.MailFolderPath, msg.Id.ToString("N") + ".eml");

            msg.SaveAs(saveToPath);

            // notify via SignalR
            var hubContext = SignalR.GlobalHost.ConnectionManager.GetHubContext <SmtpServerHub>();

            SmtpServerHub.NotifyReceiveMessage(msg, hubContext.Clients);
        }