jmail.Message Msg=new jmail.Message();
Msg.Logging=true;
//日志启用
Msg.Logging=true;
Msg.Silent=true;
//smtpserver用户名,密码
Msg.MailServerUserName="gl77";
Msg.MailServerPassWord="8562";
//邮件主题
Msg.Subject="测试";
//邮件内容
Msg.Body="测试";
Msg.Encoding="base64";
Msg.Charset="gb2312";
//发信人
Msg.From="[email protected]";
Msg.FromName="gl77";
//添加收信人
Msg.AddRecipient( "[email protected]","gl77","ok");
//优先级
Msg.Priority=3;
//添加附件
Msg.AddAttachment("d:\\新建 文本文档.txt",true,"txt");
if(Msg.Send("smtp.163.com",false))
Count.Text="ok"
Msg.Logging=true;
//日志启用
Msg.Logging=true;
Msg.Silent=true;
//smtpserver用户名,密码
Msg.MailServerUserName="gl77";
Msg.MailServerPassWord="8562";
//邮件主题
Msg.Subject="测试";
//邮件内容
Msg.Body="测试";
Msg.Encoding="base64";
Msg.Charset="gb2312";
//发信人
Msg.From="[email protected]";
Msg.FromName="gl77";
//添加收信人
Msg.AddRecipient( "[email protected]","gl77","ok");
//优先级
Msg.Priority=3;
//添加附件
Msg.AddAttachment("d:\\新建 文本文档.txt",true,"txt");
if(Msg.Send("smtp.163.com",false))
Count.Text="ok"
解决方案 »
- 在cs 文件里的代码调用页面的HTML元素的解决方案是什么?
- 表单发送
- ajax.dll 使用时,千万别使用中文名称。。
- overflow-x不是有效的CSS属性名怎么解决?
- 求 excel 导入 oracle c#源代码
- 问个变态问题,一个虚拟主机能不能绑1000个主机头
- ______关于FreeTextBox1.6.3 “插入视频”的改造问题,谢谢各位前辈
- onclick事件问题
- 问一个datareader记录写到数组的问题(up有分)
- 我该从C#转到VB.NET吗?(散分)
- css 熟悉者请进!!!!!!!!!!
- 奇怪的问题,server 200+vs.net 2002报系统不能启动调试!
Imports System.Data
Imports System.Data.SqlClient
Module sendmail
Public Overloads Function mail(ByVal strMailTo As String, ByVal strSubject As String, ByVal strHtml As String, ByVal intGrade As Integer) As Boolean
Try
Dim objMail As New Message()
With objMail
.Charset = "GB2312"
.From = "***"
.FromName = "***"
.AddRecipient(strMailTo)
.Subject = strSubject
.AppendHTML(strHtml)
.Priority = intGrade
.Send("username:[email protected]")
.Close()
End With
objMail = Nothing
Return True
Catch
Return False
End Try
End Function