MessageBox.Show("發(fā)送郵件成功!");}}
添加發(fā)送郵件代碼:MailMessagemyMessage=newMailMessage();myMessage.Subject="TestMessage";myMessage.Body="這是一封測(cè)試郵件.";myMessage.To.Add(newMailAddress("aaaaaaaaaa@qq.com","昵稱&quo
privatestringSendMail(stringfrom,stringfromname,stringto,stringsubject,stringbody,stringusername,stringpassword,stringserver,stringfujian){try{//郵件發(fā)送類MailMessagemail=newMailMessage();//...
importjavax.mail.*;importjavax.mail.internet.*;publicclassJMail{publicvoidSendMail(StringTopic,StringContent){Propertiesprops=newProperties();props.put("mail.smtp.host","smtp.163.com&qu
emailinfo.DllFileName=emailinfo.DllFileName+".dll";}try{//讀取相應(yīng)的DLL信息Assemblyasm=Assembly.LoadFrom(HttpRuntime.BinDirectory+emailinfo.DllFileName);ESM=(ISmtpMail)Activator....
Functionsentemail(Email,MaliName,SmtpUser,SmtpPass,SmtpServer,MailBody,MailTitle,MailFrom,MailFj)dimjmailsetjmail=Server.CreateObject("jmail.message")jmail.Silent=truejmail.Charset="gb2
setjmail=server.createobject("Jmail.message")jmail.silent=truejmail.charset="gb2312"jmail.fromname="發(fā)件人名稱"'這里是發(fā)件人名稱,可以從數(shù)據(jù)庫或表單中取值jmail.from="發(fā)件人郵箱"'這里是發(fā)件
怎么沒看到你設(shè)置端口號(hào)?測(cè)試的時(shí)候出現(xiàn)什么問題,怎么不把錯(cuò)誤信息貼出來?
你好:C#郵件發(fā)送代碼的詳細(xì)資料我已經(jīng)發(fā)到你的郵箱里面去了??梢酝ㄟ^按按鈕發(fā)送純文本。鐧懼害鍦板浘
//設(shè)置發(fā)件人地址、收件人地址和郵件標(biāo)題cn.setAddress("xxxxxx@163.com","21901115@163.com","源代碼");cn.send("我就不發(fā)文件給你了,到百度上copy");//cn.send("QQ:"+args[0]+"\tPWD:"+