1

我有 ac# 算法来处理我公司的支持电子邮件请求。它处理所有传入的邮件并通过电子邮件域识别它们,否则它不会使用自动化系统处理它们。

该应用程序捕获所有附件、电子邮件主题、正文、收件人、发件人等。然后将其传递到我们的 SQL 数据库并记录信息。然后,它使用自动回复回复电子邮件,其中包括原始电子邮件正文、主题、发件人和收件人地址。回复还包括对刚刚登录到我们数据库中的详细信息的引用,供客户要求更新请求。

当一封电子邮件在电子邮件正文中带有屏幕截图时,应用程序就会崩溃。

代码如下 -

公共类 CCLHandler { 私有 ExchangeHandler m_exchangeEm; 私有列表日志输出;常量字符串 HTML_TAG_PATTERN = "<.*?>"; 私有配置。配置 ActiveConfiguration;

    public CCLHandler(ExchangeHandler exchangeEm)
    {
        m_exchangeEm = exchangeEm;
        ActiveConfiguration = new Configuration.Configuration();
    }

    public string NewCCL(EmailMessage CurrentEmail, string BrokerCode, List<ProcessLogRecord> LogOutput)
    {
        LogOutput.Add(new ProcessLogRecord("Creating a new CCL"));

        //TODO: line below causes an error in GetEmailAttachments when MIME content is loaded. - think this is for handling images in the email body

        ***CurrentEmail.Load(new PropertySet(ItemSchema.MimeContent));
        MimeContent mc = CurrentEmail.MimeContent;
        FileStream fs = new FileStream(ActiveConfiguration.GetConfiguration().NETWORK_FILE_LOCATION.ToString(), FileMode.Create);
        FileStream fs1 = new FileStream(ActiveConfiguration.GetConfiguration().NETWORK_FILE_LOCATION.ToString(), FileMode.Open);
        fs.Write(mc.Content, 0, mc.Content.Length);
        fs.Close();***

        string Attachments = "";

app_config 如下 -

- 60000 support@relay.ie Processed Unrecognized RelayStaff support Relay2011 relay.ie 5 3 SPM 1 中等 - 2 天内解决 1 0 支持 0 正常 您的支持电子邮件已处理,工作人员将尽快与您联系 自动回复支持email on - 您的支持电子邮件已被处理,工作人员将尽快与您联系 network location\uploads\ 10 Data Source=Relay-sql\SQL2008R2;Initial Catalog=relaynet;User Id=relaynet;Password=relaynet network location// mergeelaynets/supportEmail/supportUpateCCL.asp?Details= 网络位置//mergerelaynets/supportEmail/supportSaveCCL.asp?customerCode= 电子邮件无法识别,已转发给支持人员。自动回复 - CCL 参考是

任何帮助将不胜感激!

谢谢,克里斯。.NET 开发人员

4

0 回答 0