Vb.net 使用进度条上载附件
我有一个xml文件作为附件。我在互联网上搜索过,所有这些都是通过ftp上传的,我不知道如何使用它们发送邮件,所以在上传到邮件时,我如何使用进度条显示 这是我发送电子邮件的代码Vb.net 使用进度条上载附件,vb.net,progress-bar,Vb.net,Progress Bar,我有一个xml文件作为附件。我在互联网上搜索过,所有这些都是通过ftp上传的,我不知道如何使用它们发送邮件,所以在上传到邮件时,我如何使用进度条显示 这是我发送电子邮件的代码 Dim smtpServer As New SmtpClient Dim mail As New MailMessage() Dim mailAttachment As Attachment = New Attachment("XMLFile") smtpSe
Dim smtpServer As New SmtpClient
Dim mail As New MailMessage()
Dim mailAttachment As Attachment = New Attachment("XMLFile")
smtpServer.UseDefaultCredentials = False
smtpServer.Credentials = New Net.NetworkCredential("a@ymail.com", "12345")
smtpServer.Port = 465
smtpServer.EnableSsl = True
smtpServer.Host = "smtp.mail.yahoo.com"
mail = New MailMessage()
mail.From = New MailAddress("a@ymail.com")
mail.To.Add("a@ymail.com")
mail.Subject = "110BackUp"
mail.IsBodyHtml = False
mail.Body = "XML FILE"
mail.Attachments.Add(mailAttachment)
smtpServer.Send(mail)
如果问题是在发送电子邮件时只有进度条,也许你会发现这很有用