用VB编程 直接 发送邮件不调用其它软件
可以直接将内容发送到指定邮箱.
用VB编程 直接 发送邮件不调用其它软件
可以直接将内容发送到指定邮箱.
With poSendMail .SMTPHostValidation = VALIDATE_HOST_DNS ' Optional, default = VALIDATE_HOST_DNS .EmailAddressValidation = VALIDATE_SYNTAX ' Optional, default = VALIDATE_SYNTAX .SMTPHost = Text1 '服务器 .From = Text3 '发送者帐号 .FromDisplayName = Text2 ' 发送者姓名 .Recipient = Text8 '对方信箱 .RecipientDisplayName = IIf(Len(Text10) = 0, Text8, Text10) ' 对方称呼" .CcRecipient = "" ' 抄送 .CcDisplayName = "" ' 抄送 .BccRecipient = "" '抄送 .ReplyToAddress = "" ' 抄送 .Subject = Text4 '主题 .Message = Text7 '& vbCrLf & vbCrLf & "易得优邮件群发系统 http://www.qhdedu.com QQ:25295110 TEL:13933612770" & vbCrLf & "秦皇岛易得优软件公司 您的优秀 我的追求" '信息内容 .Attachment = Trim(Text5) '附件内容
.AsHTML = IIf(ckHtml.Value = 1, True, False) ' Optional, default = FALSE, send mail as html or plain text .ContentBase = "" ' Optional, default = Null String, reference base for embedded links .EncodeType = MyEncodeType ' Optional, default = MIME_ENCODE .UseAuthentication = IIf(ckLogin.Value = 1, True, False) ' Optional, default = FALSE .UserName = txtUserName ' Optional, default = Null String .Password = txtPassword ' Optional, default = Null String, value is NOT saved .Send ' Required End With