sry ich dacht mir das keiner böse wird wenn ich das hier poste. naja das sind ja 1000 seiten..
ist das nicht ein kleiner code?
kannst du den bitte zusammenfassen _________________
tr4st_ « Moderator »
Anmeldedatum: 17.12.2007 Beiträge: 315 Wohnort: Private Class _ Villa()
Verfasst am: 03.04.2008, 17:13
Das ist die Funktion.
Code:
Private Function SendMail(SMTP As String, FromName As String, _
FromMail As String, ToName As String, ToMail As String, Subj As String, _
Body As String) As Boolean
Dim Mail As String, outTO As String, outFR As String
If Mailing = True Then Exit Function
Mailing = True
MousePointer = vbHourglass
If Winsock1.State = sckClosed Then
On Error Goto ERRORMail
Winsock1.LocalPort = 0
'### Verbunden
ShowStatus ("Verbunden")
Winsock1.SendData ("HELO " & Domain & vbCrLf)
If Not Response("250") Then Goto ERRORMail
'### Mail Senden
ShowStatus ("Nachricht Senden")
'UPDATE am 28. September 2002
Winsock1.SendData (outFR)
If Not Response("250") Then Goto ERRORMail
Winsock1.SendData (outTO)
If Not Response("250") Then Goto ERRORMail
Winsock1.SendData ("DATA" & vbCrLf)
If Not Response("354") Then Goto ERRORMail
Winsock1.SendData (Mail)
If Not Response("250") Then Goto ERRORMail
'UPDATE ENDE
'### Trennen
ShowStatus ("Trennen")
Winsock1.SendData ("quit" & vbCrLf)
If Not Response("221") Then Goto ERRORMail
ShowStatus ("Nachricht verschickt !")
SendMail = True
End If
ERRORMail:
Mailing = False
Winsock1.Close
MousePointer = vbDefault
Exit Function
End Function
_________________ Avoid Suspicion, Manipulate your friends, Eliminate your enemies.