Hi,
Erst mal, das schwierigste davon ist das abschicken einer
email.
Das geht z.B. mit VBS ganz einfach, läuft auch in VB5, VB6. Ganz ohne Control. Hab’ ich irgendwann mal mit Google gefunden.
Const cdoBasic = 1 'basic (clear-text) authentication
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.From = """Name"" "
objMessage.To = "[email protected]"
objMessage.TextBody = "This is some sample message text.." & vbCRLF & "It was sent using SMTP authentication."
'This section provides the configuration information for the remote SMTP server.
With objMessage.Configuration.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
'Type of authentication, NONE, Basic (Base64 encoded), NTLM
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
'Your UserID on the SMTP server
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "[email protected]"
'Your password on the SMTP server
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Passwort"
'Server port (typically 25)
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
'Use SSL for the connection (False or True)
'Get error: Must issue a STARTTLS command first, if server use SSL but you set False
.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)
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
.Update
End With
'End remote SMTP server configuration section
On Error Resume Next
objMessage.Send
If Err 0 Then
Msgbox "Send email failed: " & Err.Description
Else
Msgbox "OK!"
End if
Getestet mit XP und Win7. Zumindest mit der Gmail-Adresse läuft das ohne Problem.
Gruß Chewpapa