So senden Sie E-Mail mit vbscript und remote-smtp-server. Ich bin verbunden über einen proxy

Habe ich versucht zu schreiben, ein vbscript zum E-mail Verwendung von Google Mail smtp-aber es funktioniert nicht, weil ich bin verbunden mit dem internet über proxy.
Unten ist mein code.


Set objMessage = CreateObject("CDO.Message") 
objMessage.Subject = "Example CDO Message" 
objMessage.From = "[email protected]" 
objMessage.To = "[email protected]" 
objMessage.TextBody = "This is some sample message text."

'==This section provides the configuration information for the remote SMTP server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "MyUserName"

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "MyPassword"


objMessage.Configuration.Fields.Update

'==End remote SMTP server configuration section==

objMessage.Send

wenn ich diesen code ausführen, es gibt mir Fehler "transport failed to connect to the server"
Kann jemand mir ein Beispiel. Ich bin verbunden mit dem internet über proxy.

Dank
Waqar

InformationsquelleAutor Waqar | 2011-02-12

Schreibe einen Kommentar