日期:2014-05-20  浏览次数:20460 次

誰有發郵件的例子 散分。。。(100分)在線等。。。。
誰有發郵件的例子   散分。。。(100分)
Dim   msgObj   As   New   EmailMessage
                Dim   server   As   New   SMTPServer
                Dim   smtpObj   As   New   SMTP

                msgObj.Subject   =   txtSubject.Text.Trim
                msgObj.Recipients.Add( "matthew12@163.com ",   "matthew.mak ",   RecipientType.To)

                msgObj.From.Email   =   txtMail.Text.Trim
                msgObj.From.Name   =   txtName.Text.Trim
                msgObj.BodyParts.Add(txtContent.Text.Trim)

                server.Port   =   (     )------> 端口是多少
                server.Name   =   "mail.163.com "
                server.Account   =   " "--------> 這里寫什麼名字
                server.Password   =   " "
                server.AuthMode   =   SMTPAuthMode.AuthLogin

                smtpObj.SMTPServers.Add(server)

                Try
                        smtpObj.Send(msgObj)
                        lblmsg.Text   =   "成功   ! "
                Catch   ex   As   LicenseException
                        lblmsg.Text   =   "License   key   error:   "   +   ex.Message
                Catch   ex   As   FileIOException
                        lblmsg.Text   =   "File   IO   error:   "   +   ex.Message
                Catch   ex   As   SMTPAuthenticationException
                        lblmsg.Text   =   "SMTP   Authentication   error:   "   +   ex.Message
                Catch   ex   As   SMTPConnectionException
                        lblmsg.Text   =   "Connection   error:   "   +   ex.Message
                End   Try

------解决方案--------------------
http://community.csdn.net/Expert/topic/5245/5245849.xml?temp=.2454492

曾经在里面给个一个成功的例子
------解决方案--------------------
路过

------------------------
http://fenglin.xland.cn
------------------------
------解决方案--------------------