POP3

Blitz3D Forums/Blitz3D Programming/POP3

asdfasdf(Posted 2004) [#1]
What's wrong?
AppTitle "Adren Software E-mailer"

Graphics 1024,768,8

Print "   Main Menu  "
Print
Print "1. Read E-mail"
Print "2. Send E-mail"
Print "3. Exit"
Print
answer = Input("")

If answer = 2 Then
	Send()
ElseIf answer = 3 Then
	End
EndIf

Function Send()

Cls
Locate 0,0

isp$ = Input$("What is your ISP: ")
user$ = Input$("What is your username: ")
pass$ = Input$("What is your password: ")

Cls
Locate 0,0

emailTo$ = Input$("To: ")
emailFrom$ = Input$("From: ")
emailSubject = Input$("Subject: ")

Cls
Locate 0,0

Print "For linebreaks add '|' to the end of a line then press [enter]"
Print "Body:

Repeat

body$ = body$ + Input$("")

Until Not Right(body$,1) = "|"

encrypted$ = Encrypt(body$)

Cls

Locate 0,0

tcp = OpenTCPStream(isp$,110)

ips = CountHostIPs("")

Print ReadLine(tcp)

WriteLine(tcp,"USER " + user$)

Print "USER " + user$

Print ReadLine(tcp)

WriteLine(tcp,"PASS " + pass$)

Write "PASS "

For i = 0 To Len(pass$) - 1
	Write "*"
Next

Print

Print ReadLine(tcp)

WriteLine(tcp,"MAIL FROM<" + emailFrom$ + ">")
Print "MAIL FROM:<" + emailFrom$ + ">"

Print ReadLine(tcp)

WriteLine(tcp,"RCPT TO<" + emailTo$ + ">")

Print "RCPT TO<" + emailTo$ + ">"

Print ReadLine(tcp)

WriteLine(tcp,"DATA")
Print "DATA"

Print ReadLine(tcp)

WriteLine(tcp,encrypted$)
Print encrypted$
WriteLine(tcp,"")
Print ""
WriteLine(tcp,".")
Print "."
WriteLine(tcp,"QUIT")
Print "QUIT"

CloseTCPStream(tcp)

End Function

Function Encrypt(what$)
;I'm not going to let you see my encryption code
Return what$
End Function



Perturbatio(Posted 2004) [#2]
perhaps elaborating on the issue you are experiencing would be a good idea.


karmacomposer(Posted 2004) [#3]
that's hysterical