Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set iMsg = CreateObject("CDO.Message")
- Set iConf = CreateObject("CDO.Configuration")
- Set Flds = iConf.Fields
- schema = "http://schemas.microsoft.com/cdo/configuration/"
- Flds.Item(schema & "sendusing") = 2
- Flds.Item(schema & "smtpserver") = "smtp.gmail.com"
- Flds.Item(schema & "smtpserverport") = 465
- Flds.Item(schema & "smtpauthenticate") = 1
- Flds.Item(schema & "sendusername") = "YOUR@EMAIL.COM"
- Flds.Item(schema & "sendpassword") = "YOUR PASSWORD"
- Flds.Item(schema & "smtpusessl") = 1
- Flds.Update
- If wscript.arguments.item(1) <> "" Then
- body = wscript.arguments.item(1) & Chr(13) & Chr(10)
- End If
- If wscript.arguments.item(2) <> "" Then
- dest = wscript.arguments.item(2) & Chr(13) & Chr(10)
- End If
- With iMsg
- .To = dest
- .From = "MYOUR NAME <YOUR@EMAIL.COM>"
- .Subject = wscript.arguments.item(0)
- .TextBody = body
- .Sender = " "
- .Organization = " "
- .ReplyTo = " "
- Set .Configuration = iConf
- SendEmailGmail = .Send
- End With
- set iMsg = nothing
- set iConf = nothing
- set Flds = nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement