override protected void Dispose(bool disposing) { lock (m_lock) { if (m_bdisposed) return; m_bdisposed = true; } if (disposing) GC.SuppressFinalize(this); if (m_emailProxy != null) { m_emailProxy.Dispose(); m_emailProxy = null; } if (m_email2Uro != null) { m_email2Uro.Dispose(); m_email2Uro = null; } m_application = null; }
private void ProcessProperties(IEmailProxy proxy) { if (null == m_uro) return; string subject; if (m_uro.Properties.TryGetValue(MailMessagePropertyKeys.Subject, out subject)) { proxy.Subject = subject; } string formattedBody; if (m_uro.Properties.TryGetValue(MailMessagePropertyKeys.FormattedBody, out formattedBody)) { proxy.FormattedBodyText = formattedBody; } }
private void ProcessSender(IEmailProxy proxy) { if ((null == m_uro) || (0 == m_uro.Source.Items.Count)) return; IRoutingItem senderRoutingItem = m_uro.Source.Items[0]; if (null == senderRoutingItem) return; EmailRecipient sender = new EmailRecipient(); sender.EmailAddress = senderRoutingItem.Content; string displayName; if (senderRoutingItem.Properties.TryGetValue(SMTPPropertyKeys.DisplayName, out displayName)) { sender.Name = displayName; } proxy.Sender = sender; }
public Email2Request(IEmailProxy emailProxy) { m_emailProxy = emailProxy; }
public Email2Mime(IEmailProxy emailProxy) { m_emailProxy = emailProxy; m_mimeProxy = new MimeProxy(new byte[] { }); }
public Email2Uro(IEmailProxy emailProxy) { m_emailProxy = emailProxy; }
private void ProcessRecipients(IEmailProxy proxy) { if ((null == m_uro) || (0 == m_uro.Destination.Items.Count)) return; proxy.ToRecipients.Clear(); proxy.CcRecipients.Clear(); proxy.BccRecipients.Clear(); foreach (IRoutingItem routingItem in m_uro.Destination.Items) { string readOnlyValue; if (routingItem.Properties.TryGetValue(EmailProperties.ReadOnlyKey, out readOnlyValue)) { if (System.Convert.ToBoolean(readOnlyValue, System.Globalization.CultureInfo.InvariantCulture)) continue; } EmailRecipient recipient = new EmailRecipient(); recipient.EmailAddress = routingItem.Content; string displayName; if (routingItem.Properties.TryGetValue(SMTPPropertyKeys.DisplayName, out displayName)) { recipient.Name = displayName; } string addressType; if (!routingItem.Properties.TryGetValue(SMTPItemPropertyKeys.AddressType, out addressType)) continue; switch (addressType) { case AddressType.To: proxy.ToRecipients.Add(recipient); break; case AddressType.CC: proxy.CcRecipients.Add(recipient); break; case AddressType.BCC: proxy.BccRecipients.Add(recipient); break; default: break; } } }
private void ProcessHeaders(IEmailProxy proxy) { if (m_uro.Properties.ContainsKey(MailMessagePropertyKeys.xPriority)) proxy.Priority = XHeaderParser.FromXHeader(m_uro.Properties[MailMessagePropertyKeys.xPriority]); }
private void InitialiseMailProxies(MailItem mailItem) { m_emailProxy = UseOutlookDOMForProcessing ? (IEmailProxy) new OutlookMailProxy(mailItem) : new RedemptionMailProxy(mailItem, true, DisableAccessToDOMAttachments); }