CDO - SMTP Port 578 - Transport - keine Verbindung
28.03.2019 10:44:42
Fragstuff
ich habe von unserer IT nun SMTP Zugangsdaten bekommen
Benutzername: DOMAIN\USERNAME
Port: 587
Sicherheit: STARTTLS
Authentifizierung: Passwort, normal
und möchte nun aus Excel heraus via der CDO Bibliothek E-Mails über den SMTP Server versenden. Den entsprechenden Verweis:
"Microsoft CDO for Windows 2000 Library"
ist aktiviert.
Habe mich auch bereits in diversen Foren schlau gemacht und komme seit heute morgen um 7 Uhr einfach auf keine Lösung und bin am verzweifeln.
Folgende Fehlermeldung erhalten ich:
"Laufzeitfehler '-2147220973 (80040213)':
Der Transport konnte keine Verbindung zum Server herstellen."
Anbei der VBA-Code:
Public Sub SMTP()
Dim iMsg As Object
Dim iConf As Object
Dim strbody As String
Dim Flds As Variant
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.XXXXXXXX.com"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 578
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "DOMAIN\USERNAME"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "XXXXXX"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendtls") = True
.Update
End With
strbody = "Dear Madams," & vbNewLine & vbNewLine & _
"please find attached the test order overview." & vbNewLine & vbNewLine & _
"Kind Regards" & vbNewLine & vbNewLine & _
"test gmbh"
With iMsg
Set .Configuration = iConf
.To = "XXX@XXXX.com"
.CC = ""
.BCC = ""
.From = "SMTPPOSTFACH@XXXX.com"
.Subject = "Order "
.TextBody = strbody
.Send
End With
End Sub
Hat hier jemand noch einen Ratschlag den er mir mit auf den Weg geben könnte ?