コード例 #1
0
ファイル: EmailRecorder.cs プロジェクト: kbortnik/mailfunnel
        private void MessageReceived(object sender, MessageReceivedEventArgs e)
        {
            var groupId = 0;
            // Is there a group?
            if (!string.IsNullOrWhiteSpace(e.Message.Group))
            {
                var group = _groupRepository.GetGroup(e.Message.Group);
                if (group != null)
                    groupId = group.Id;
            }

            _emailRepository.SetEmail(new Email
            {
                From = e.Message.Sender,
                To = string.Join(";", e.Message.Recipients),
                Subject = e.Message.Subject,
                BodyHtml = e.Message.Message,
                GroupId = groupId
            });
        }
コード例 #2
0
ファイル: SmtpServer.cs プロジェクト: kbortnik/mailfunnel
 protected virtual void OnMessageReceived(MessageReceivedEventArgs e)
 {
     MessageReceived?.Invoke(this, e);
 }