can't send a email
Hi, my scrpit is as below, but can't send email successfully, who do you know the reason Sub MainTest NameSpace = "http://schemas.microsoft.com/cdo/configuration/" set Email = CreateObject("CDO.Message") Email.From = "smiletonghaiyan85@163.com" Email.To = "smiletonghaiyan85@163.com" Email.Subject = "send email" x="C:\Users\H208139\Desktop\New Text Document.txt" Email.Textbody = "hello" Email.AddAttachment x with Email.Configuration.Fields .Item(NameSpace&"sendusing") = 2 .Item(NameSpace&"smtpserver") = "smtp.163.com" .Item(NameSpace&"smtpserverport") = 25 .Item(NameSpace&"smtpauthenticate") = 1 .Item(NameSpace&"sendusername") = "smiletonghaiyan85" .Item(NameSpace&"sendpassword") = "********" .Update end with Email.Send Set Email=Nothing End Sub1.1KViews0likes2Comments