我也要这个东西吖~~~~去下个群发软件,再WINFORM里面做个按钮调用那个群发软件里面的接口。
解决方案 »
- 微信API 链接网址接入 大侠请进
- C#实现PC机利用手机GPRS上网
- 网络编程问题
- txtbox输入内容限制??.NET2003 C# help!!在线等待。
- 请问关于Vs2005开发的B/S结构的应用程序使用加密锁问题?
- form放大缩小,执行哪些东西呀?
- 弱弱地问一句 c# API语法问题
- 哪位大哥详细给我讲解下:dgIDs.Substring (0, dgIDs.LastIndexOf (","))为什么就是去掉最后的一个“,” ?
- 关于IHttpModule和IHttpHandler的问题
- 如何用FileStream清除打开文件中的所有内容?
- 动态生成控件不响应事件的问题(100分)
- 请问如何改变datagrid中每一列的列名?
<WebMethod()> Public Function getYouEMail(ByVal strMD5Flag As String, ByVal emTo As String, ByVal emFrom As String, ByVal emSubject As String, ByVal emBody As String, ByVal emPri As String, ByVal laberr As String) As Boolean
Dim newMail As New Mail.MailMessage() '定义一个邮件发送函数
Dim eMailFormat As eMailStruct
Dim services() As ServiceProcess.ServiceController = ServiceProcess.ServiceController.GetServices '得到所有service服务
Dim service As ServiceProcess.ServiceController
For Each service In services '比较所有服务中有没有SMTP服务
If service.ServiceName = "SMTPSVC" Then '如果有SMTP服务
scflag = True '设定标志位
Exit For
End If
Next
If scflag = False Then '如果没有找到SMTP服务器,则抛出错误。
Throw New Exception("没有找到SMTP服务,请确认。")
End If
If Not service.Status = ServiceProcess.ServiceControllerStatus.Running Then '如果SMTP不在运行状态,重新启动它
service.Start()
End If
With eMailFormat '将数据传入结构
.emailAddress = emTo
.emailForm = emFrom
.emailSubject = emSubject
.emailbody = emBody
.emailPriority = emPri
End With
With newMail '定义电子邮件的内容
.From = eMailFormat.emailForm
.To = eMailFormat.emailAddress
'.Cc = eMailFormat.emailCc
'.Bcc = eMailFormat.emailBcc
.Subject = eMailFormat.emailSubject
.Body = eMailFormat.emailbody
.Priority = eMailFormat.emailPriority '新邮件的等级(急件或其它)
.BodyFormat = Text '定义发送邮件的格式txt或html
End With
smtpMail.SmtpServer = "" '"172.30.0.167"
smtpMail.Send(newMail)
Return True
Catch
laberr = Err.Description
Return False
End Try
End Function