|
3#
楼主 |
发表于 2008-1-29 14:05:55
|
只看该作者
回复 2# 的帖子
' Send Email without Installing the SMTP Service
' Windows Server 2003 : Yes
' Windows XP : Yes
' Windows 2000 : Yes
' Windows NT 4.0 : Yes
' Windows 98 : Yes
Public Function Send_mail ( You_Account, Send_Email, Subject, Body)
Set objEmail = CreateObject("CDO.Message")
'发送人
objEmail.From = You_Account
'收件人
objEmail.To = Send_Email
'主题
objEmail.Subject = Subject
'内容
objEmail.Textbody = Body
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'服务器
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"自己公司的STMP"
'端口号
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send
End Function
这样就搞定了,分享给大家学习一下。 |
|