Outlook收件人未收到发送的电子邮件 [英] outlook recipients are not receiving emails sent

查看:88
本文介绍了Outlook收件人未收到发送的电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请原谅我,如果这是错误的论坛,因为我不是真正的开发者。只是帮助了一个朋友。

pardon me if this is the wrong forum as i'm not really the developer. just helping out a friend.

他有这个代码向Outlook收件人发送电子邮件提醒。最近,收件人无法收到提醒。通过擦除Outlook名称缓存找到了一个幸运的解决方法。但由于这是一种解决方法,我们正在尝试查找原因
,为什么我们需要清除Outlook名称缓存才能从此应用程序接收电子邮件。如果我发送电子邮件给这个问题的用户,无论是来自另一个Outlook还是来自互联网,他们会收到电子邮件(这是在清除名称缓存之前),但不是来自应用程序的


he have this code that sends email alerts to Outlook recipients. lately, the recipients are unable to receive the alerts. a fortunate workaround was found by erasing the Outlook name cache. but since it's a workaround, we are trying to look for the cause on why do we need to clear the Outlook name cache in order to receive an email from this app. if i send an email to this problem users, either from another Outlook or from the Internet, they receive the email (this is before clearing the name cache) but not from the app.

这是发送给我的代码,它发送下面发送的电子邮件提醒。感谢任何帮助。

here is the code sent to me that does the email alert sending below. appreciate any help.

Public Shared Sub Send_Email(ByVal To_Email_Adresses() As String, ByVal CC_Email_Adresses() As String, ByVal BCC_Email_Adresses() As String, ByVal Email_Subject As String, ByVal Email_Body As String, ByVal Asynch As Boolean)
            Dim Smtp As System.Net.Configuration.SmtpSection = DirectCast(ConfigurationManager.GetSection("system.net/mailSettings/smtp"), System.Net.Configuration.SmtpSection)
            Dim smtpClient As New SmtpClient(Smtp.Network.Host)
            Dim message As New MailMessage()
            Try
                Dim from_email As New MailAddress(Smtp.From, ConfigurationManager.AppSettings("PDREmailAliasName").ToString(), System.Text.Encoding.UTF8)

                If Not IsNothing(To_Email_Adresses) Then
                    For Each to_email In To_Email_Adresses
                        message.To.Add(to_email)
                    Next
                End If
                If Not IsNothing(CC_Email_Adresses) Then
                    For Each to_email In CC_Email_Adresses
                        message.CC.Add(to_email)
                    Next
                End If
                If Not IsNothing(BCC_Email_Adresses) Then
                    For Each to_email In BCC_Email_Adresses
                        message.Bcc.Add(to_email)
                    Next
                End If

                message.Body = Email_Body
                message.Body += Environment.NewLine
                message.BodyEncoding = System.Text.Encoding.UTF8
                message.Subject = Email_Subject
                message.SubjectEncoding = System.Text.Encoding.UTF8
                message.IsBodyHtml = True

                If (Asynch) Then
                    Dim sd As SendEmailDelegate = New SendEmailDelegate(AddressOf smtpClient.Send)
                    Dim cb As AsyncCallback = New AsyncCallback(AddressOf SendEmailResponse)
                    sd.BeginInvoke(message, cb, sd)
                Else
                    smtpClient.Send(message)
                End If
            Catch ex As Exception
                Throw ex
            End Try
        End Sub

推荐答案

您是否尝试使用纯文本而非html正文发送电子邮件的简化版本,如果不应该尝试这个。还可以使用异步方法并将结果写出到日志文件并检查日志,或者如果可以在
中重现,IDE会将结果写入输出窗口。

Have you tried sending a simplified version of the email using plain text rather than html body, if not this should be attempted. Also use the asynchronous method and write out the results to a log file and examine the log or if this can be reproduce in the IDE write the results to the output window.

日志记录可按照
此处
的说明完成。

The logging can be done as explained here.

底线是代码看起来很好,但电子邮件内容很可能会破坏某些东西,因此是从html正文简化为纯文本的原因。

Bottom line is the code appears fine yet the email content may very well be corrupting something hence the reason for simplifying from html body to plain text.

如果以上内容没有帮助我可以移动这个问题是Outlook for developer论坛。 

If the above doesn't help I can move this question to the Outlook for developer forum. 


这篇关于Outlook收件人未收到发送的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆