在发出电子邮件时,使用SmtpClient和邮递Message(www.net 3.5)“To”电子邮件地址在发送之前就得到了验证。 我在寄信之前就翻了一番多的电子邮件地址,在你试图用SmtpClient发出电文时,就形成了一种形式。 这实际上是一件好事,因为,在签字之前,一只狗被指定为无效。 不幸的是,这些电子邮件在现实世界中存在,如果你利用你喜欢的电子邮件客户寄出,这些电子邮件就会送达。
我的问题是,能否通过SmtpClient/mailMessage进行电子邮件验证?
在发出电子邮件时,使用SmtpClient和邮递Message(www.net 3.5)“To”电子邮件地址在发送之前就得到了验证。 我在寄信之前就翻了一番多的电子邮件地址,在你试图用SmtpClient发出电文时,就形成了一种形式。 这实际上是一件好事,因为,在签字之前,一只狗被指定为无效。 不幸的是,这些电子邮件在现实世界中存在,如果你利用你喜欢的电子邮件客户寄出,这些电子邮件就会送达。
我的问题是,能否通过SmtpClient/mailMessage进行电子邮件验证?
这在发出电子邮件后可能是错误的。
你们能够提供一些“呼吁书”,以便我们能够看到哪里出现了完全例外的情况。
Update: According to the disassemble code from reflector, this problem can be sold only by upgrading to the VS2010 and .NET 4.0
系统版本较低。 集会网无法解决这一问题。
Edit:在VB2005年把样本编码放在一起,我也例外。 下面的法典在VB2010年快车上课以罚款,但看来是现在固定的。 MSDN 引用的是4.0英才华,该氮并非先前版本的MSDN网页。
现在我可以尝试,但你电子邮件地址是如何格式的? <代码> 邮件/地址编码>类别的文件指出,它支持
Edit: 添加样本。
Try
Dim smtpClient As New SmtpClient()
smtpClient.Host = "mailserver"
Dim fromAddress As New MailAddress("from@test.com")
Dim toAddresses As New MailAddress("test.test.@test.com")
Using message As New MailMessage()
message.From = fromAddress
message.To.Add(toAddresses)
message.IsBodyHtml = False
message.Subject = "test"
smtpClient.Send(message)
End Using
TextBox1.Text = "OK"
Catch ex As SmtpException
TextBox1.Text = ex.ToString()
End Try
As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...
I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...
I have two EF entities. One has a property called HouseNumber. The other has two properties, one called StartHouseNumber and one called EndHouseNumber. I want to create a many to many association ...
I m using decimal type (.net), and I want to see if two numbers are equal. But I only want to be accurate to 10 decimal places. For example take these three numbers. I want them all to be equal. 0....
I m creating an STA version of the SynchronizationContext for use in Windows Workflow 4.0. I m wondering what to do about exceptions when Post-ing callbacks. The SynchronizationContext can be used ...
I ve got some code which sets up a datacontext. Often enough, the datacontext should be set to some underlying data collection, such as an ObservableCollection - but occasionally I d like to set it ...
I am building an application with C#. I managed to turn this into a single instance application by checking if the same process is already running. Process[] pname = Process.GetProcessesByName("...
NOTE I have asked the related question (with an accepted answer): How to combine DataTrigger and Trigger? I think I need to combine an EventTrigger and a DataTrigger to achieve what I m after: when ...