I can´t belive it:
It doesnt work!
Last answer from the server: 250-SIZE
Any more ideas? I´m depressived!
AppTitle "Mail" Global com Print popaccountlogin ("pop.1und1.de","lukas-maeusezahl@...","*******") Print send$("smtp.1und1.de",50,"Lukas","lukas-maeusezahl@online.de","Lukas","lukas-maeusezahl@...") Print popaccountlogout() WaitKey ;-------------------------------------------------- ;MailSender ;-------------------------------------------------- Function send$(server$,timeout%,mailfromname$,mailfrom$,toname$,mailto$,sub$) sm = OpenTCPStream (server$,25) If sm = 0 Then Return "-ERR Could not connect" ;Say EHLO WriteLine sm,"EHLO Mailer" Delay timeout% r$ = ReadLine (sm) If Left(r$,1) <> 2 Then Return "-ERR EHLO failed: "+r$ DebugLog "+OK Server says: " + r$ WriteLine sm,"AUTH LOGIN" ReadLine (sm) ;Sender´s name WriteLine sm,"MAIL FROM: "+mailfromname$ Delay timeout% r$ = ReadLine (sm) If Left(r$,1) <> 2 Then Return "-ERR "+r$ DebugLog "+OK Server says: " + r$ ;RCTP WriteLine sm,"RCTP TO: "+mailto$ Delay timeout% r$ = ReadLine (sm) If Left(r$,1) <> 2 Then Return "-ERR "+r$ DebugLog "+OK Server says: " + r$ ;DATA WriteLine sm,"DATA" Delay timeout% r$ = ReadLine (sm) If Left(r$,1) <> 2 And Left(r$,1) <> 3 Then Return "-ERR "+r$ DebugLog "+OK Server says: " + r$ WriteLine sm,"DATE: " + CurrentDate$ () WriteLine sm, "X-MAILER: Outlook" WriteLine sm,"FROM: "+mailfromname$+" <"+mailfrom$+">" WriteLine sm,"TO: " + toname$+" <"+mailto$+">" WriteLine sm,"SUBJECT: "+sub$ WriteLine sm,"" WriteLine sm,"TRON" WriteLine sm,"" WriteLine sm,"." Delay timeout% r$ = ReadLine (sm) If Left(r$,1) <> 2 Then Return "-ERR "+r$ DebugLog "+OK Server says: " + r$ WriteLine sm,"QUIT" r$ = ReadLine (sm) If Left(r$,1) <> 2 Then Return "-ERR "+r$ DebugLog "+OK Server says: " + r$ CloseTCPStream sm Return "+OK "+r$ End Function Function popAccountLogout$() WriteLine com, "QUIT" ; Disconnect-Commando r$ = ReadLine(com) ; Get Returnstring If Mid(r$, 1, 3) = "+OK" Then Return "+OK disconnected: " + r$ If Mid(r$, 1, 4) = "-ERR" Then Return "-ERR not disconnected: "+r$ End Function Function popAccountLogin$(server$, user$, pass$) com = OpenTCPStream(server$, 110) If com = 0 Then Return "-ERR connection failed" Else i$ = ReadLine(com) ; Intercept the greeting WriteLine com, "USER " + user$ i$ = ReadLine(com) If Mid(i$, 1, 1) = "-" Then Return "-ERR no such user: " +i$ Else WriteLine com, "PASS " + pass$ i$ = ReadLine(com) If Mid(i$, 1, 1) = "-" Then Return "-ERR password wrong: "+i$ Else Return "+OK logged in: " + i$ EndIf EndIf EndIf
It doesnt work!
Last answer from the server: 250-SIZE
Any more ideas? I´m depressived!