'Date: 2010/6/18
'Author: Demon
'QQ: 380401911
'E-mail: @
'Website:
Const Email_From = "ddd@" 'Sender Email
Const Password = "password" 'Sender's email password
Const Email_To = "380401911@" 'Recipient Email
Set CDO = CreateObject("") 'Create an object
= "From Demon" 'Email Subject
= Email_From 'Sender address
= Email_To 'Recipient Address
= "Hello world!" 'Mail text
= "C:\" 'Mail attachment file path
Const schema = "/cdo/configuration/" 'The regulations must be this, I don't know why
With 'reduce code input with keyword
.Item(schema & "sendusing") = 2 'Use SMTP server on the network instead of the local SMTP server
.Item(schema & "smtpserver") = "" 'SMTP server address
.Item(schema & "smtpauthenticate") = 1 'Server authentication method
.Item(schema & "sendusername") = Email_From 'Sender mailbox
.Item(schema & "sendpassword") = Password 'Sender's email password
.Item(schema & "smtpserverport") = 465 'SMTP server port
.Item(schema & "smtpusessl") = True 'Whether to use SSL
.Item(schema & "smtpconnectiontimeout") = 60 'Timeout for connecting to the server
.Update 'Update settings
End With
'Send email