Ich möchte eine E-mail senden mithilfe von VBScript und CDO
Hi Dieser code ist in Ordnung, die aus der Seite von mein BÜRO.Aber nicht das arbeiten in office-Netzwerk...Ist das der port blockiert ist, ist der Grund,??????
Den Code hier. Fehler ist auch schon in der vorigen.
MsgBox("Hello world")
Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory.
Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network).
Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = """xyz"" <[email protected]>"
objMessage.To = "[email protected]"
objMessage.TextBody = "hi it's me...." & vbCRLF & "this is wrking so we hav solved the issue."
'==This section provides the configuration information for the remote SMTP server.
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"
'Type of authentication, NONE, Basic (Base64 encoded), NTLM
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate ) = cdoBasic
'Your UserID on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername ) = "[email protected]"
'Your password on the SMTP server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword ) = "****************"
'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport ) = 465
'Use SSL for the connection (False or True)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl ) = True
'Connection Timeout in seconds (the maximum time CDO will try to establish a connection to the SMTP server)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout ) = 60
objMessage.Configuration.Fields.Update
'==End remote SMTP server configuration section==
objMessage.Send
MsgBox("Hello world")
Fehler:Zeile 52,Char 1,Fehler der transport-failed to connect to the server. code:80040213..
InformationsquelleAutor Alok Shukla | 2010-12-10
Du musst angemeldet sein, um einen Kommentar abzugeben.
http://www.paulsadowski.com/WSH/cdo.htm
http://forums.aspfree.com/asp-development-5/cdo-message-1-error-80040220t-47913.html
hier u finden Sie viele Beispiele
InformationsquelleAutor m.qayyum
Da Sie mit GMAIL-Adressen, ich vermute, dass Sie nicht mit einem E-Mail-server auf der gleichen Maschine, wo man dieses Skript ausgeführt?
Wenn das so ist, müssen Sie ihn konfigurieren, um die Verbindung zum remote-server. Dieser Artikel beschreibt, wie das geht: VBScript Zum E-Mail Senden Mithilfe von CDO
Blick in den Abschnitt genannt Senden einer SMS-E-Mail mit Authentifizierung gegen einen remote-SMTP-server.
Ich denke, dass der server smtp.googlemail.com und der port ist 587.
InformationsquelleAutor Hans Olsson
Wenn Sie mit SMTP-server von gmail dann zuerst versuchen, mit telnet den smtp-server og gmail auf port 25. Wenn er sagt, blockiert, versuchen Sie port 465. entweder funktionieren sollte. je nachdem, welcher port offen ist verwenden, die auf yoru Skript. Wenn keiner funktioniert, du musst besprechen Sie mit Ihrem Netzwerk-admin. firewall-Regeln wird verhindert, dass Sie, um die Kommunikation über das Büro-LAN.
InformationsquelleAutor shaon_the_rockstar