标题:[求助]邮件发不出去
取消只看楼主
adu520
Rank: 1
等 级:新手上路
帖 子:28
专家分:0
注 册:2006-5-6
 问题点数:0 回复次数:1 
[求助]邮件发不出去

为什么邮件发不出去??????
请高手指点!!!



Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim mymessage As New MailMessage
Dim i As Integer
Dim attchments(fj.Items.Count) As String
Dim attchfile As MailAttachment

mymessage.From = femail.Text
mymessage.To = txtshou.Text
mymessage.Subject = txtsub.Text
mymessage.Body = txtemail.Text
mymessage.BodyFormat = MailFormat.Html
attchfile = New MailAttachment(upfile.PostedFile.FileName)
mymessage.Attachments.Add(attchfile)

For i = 0 To fj.Items.Count - 1
attchments(i) = fj.Items(i).Value

Next


SmtpMail.SmtpServer = "smtp.163.com"

SmtpMail.Send(mymessage)

Label7.Text = "你的信件已经成功的发送到了" + txtshou.Text
Page.RegisterClientScriptBlock("ok", "<script language=javascript>alert('发送成功')</script>")

End Sub

搜索更多相关主题的帖子: 邮件 mymessage Dim Text Body 
2006-05-12 02:57
adu520
Rank: 1
等 级:新手上路
帖 子:28
专家分:0
注 册:2006-5-6
得分:0 
需要写什么程序验证啊

2006-05-12 15:56



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-63570-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.190142 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved