Here is a typical command, using CMail:
cmail.exe -host:Sender%mail.com:SomePassword%smtp.server.com:25 -from:sender%mail.com -to:receiver%mail.com -subject:"Test Mail"
(replace all % with @ characters!)
You can get CMail from here: https://www.inveigle.net/cmail/download.shtml
I did not test it with SSL. Here is a script that should work with SSL., You must save it with a .vbs extension:
sSchema = "http://schemas.microsoft.com/cdo/configuration/"
Set oEMail = CreateObject("CDO.Message")
With oEMail
.From = "sender%mail.com"
.To = "receiver%mail.com"
.ReplyTo = .From
.Subject = "This is a test mail sent at " & time()
.TextBody = "The quick brown fox"
' .AddAttachment "D:\send.vbs"
With .Configuration.Fields
.Item (sSchema & "sendusing") = 2
.Item (sSchema & "smtpserver") = "smtp.mail.com"
.Item (sSchema & "smtpserverport") = 465
.Item (sSchema & "smtpauthenticate") = true
.Item (sSchema & "sendusername") = .From
.Item (sSchema & "smtpaccountname") = .From
.Item (sSchema & "sendpassword") = "SomePassword"
.Item (sSchema & "smtpusessl") = True 'Must be lower case!
End With
.Configuration.Fields.Update
.Send
End With