Foxtable(狐表)用户栏目专家坐堂 → 下面的代码如果要用到FOXTABLE该如何变通?


  共有3775人关注过本帖树形打印复制链接

主题:下面的代码如果要用到FOXTABLE该如何变通?

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2015/1/18 10:37:00 [显示全部帖子]

mark 处理异步发送邮件

 

全局代码处理

 

Public Sub SendCompletedCallback(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs)
' Get the unique identifier for this asynchronous operation.
Dim token As String = CStr(e.UserState)

If e.Cancelled Then
    output.show("[" & token & "] Send canceled.")
End If
If e.Error IsNot Nothing Then
    output.show("[{" & token & "}] {" & e.Error.ToString() & "}" )
Else
    output.show("Message sent.")
End If

End Sub

 

 

发送代码

 

Dim client As New Net.Mail.SmtpClient("smtp.126.com")
'client.Timeout = 60000

client.UseDefaultCredentials = True
client.Credentials = new System.Net.NetworkCredential("lin_hailun@126.com", "6849338.")
client.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network

Dim [from] As New Net.Mail.MailAddress("lin_hailun@126.com", "lin " & ChrW(&HD8) & " hailun", System.Text.Encoding.UTF8)
' Set destinations for the e-mail message.
Dim [To] As New Net.Mail.MailAddress("2450314695@qq.com")
' Specify the message content.
Dim message As New Net.Mail.MailMessage([from], [To])

message.Body = "This is a test e-mail message sent by an application. "
' Include some non-ASCII characters in body and subject.
Dim someArrows As New String(New Char() {ChrW(&H2190), ChrW(&H2191), ChrW(&H2192), ChrW(&H2193)})
message.Body += Environment.NewLine & someArrows
message.BodyEncoding = System.Text.Encoding.UTF8
message.Subject = "test message 1" & someArrows
message.SubjectEncoding = System.Text.Encoding.UTF8
' Set the method that is called back when the send operation ends.
AddHandler client.SendCompleted, AddressOf SendCompletedCallback

Dim userState As String = "test message1"
client.SendAsync(message, userState)


 回到顶部