hello all user dark basic forum
telnet mail.iol.it 25 all ok
dll no ok ?
plese help.
pop mail.iol.it
type error:
data error
code 0 ?
all code in this file
hello all user the dbpro and db, plese help, attend news
remstart
This simple program demonstrates using the
TCP functions of the TCP/UDP library to send
a one line email message.
The TCP/UDP Communications Library for DarkBASIC Pro
is free, but please give the author credits in
your program.
Copyright 2002, Ariel Benzakein
www.vertextechnology.com
www.atimeoflegends.com
remend
perform checklist for fonts
rem Load the UDP Communications Library
load dll "network.dll",1
rem Get the local host name
hostname$ = call dll(1,"GetHostName")
rem Get information about the server and the line of text to send.
print "Enter your mail server name or IP address:"
input "",mailserver$
print
print "Enter your name:"
input "",name1$
print
print "Enter your email address:"
input "",name2$
print
print "Enter email address to send to:"
input "",sendto$
print
print "Enter one line of text to send via email:"
input "",email$
rem Connect to the Mail Server. Set the delay for TCP response to 2 seconds.
FileHandle = call dll(1,"OpenTCPService","smtp",mailserver$,2000)
response$ = call dll(1,"TCPLineInput",FileHandle)
code$ = left$(response$,3)
code = val(code$)
if code < 200 or code > 299 then goto _CantConnect
print
print "Connected to mail server ..."
rem Send a HELO request to the mail server
hellomsg$ = "HELO " + hostname$
result = call dll(1,"TCPPrint",FileHandle,hellomsg$)
response$ = call dll(1,"TCPLineInput",FileHandle)
code$ = left$(response$,3)
code = val(code$)
if code < 200 or code > 299 then goto _HeloError
print "HELO request accepted by mail server ..."
rem Tell the mail server who we are
mailsend$ = "MAIL FROM: <" + name2$ + ">"
result = call dll(1,"TCPPrint",FileHandle,mailsend$)
response$ = call dll(1,"TCPLineInput",FileHandle)
code$ = left$(response$,3)
code = val(code$)
if code < 200 or code > 299 then goto _MailFromError
print "MAIL FROM accepted by mail server ..."
rem Tell the mail server where the mail is going
mailto$ = "RCPT TO: <" + sendto$ + ">"
result = call dll(1,"TCPPrint",FileHandle,mailto$)
response$ = call dll(1,"TCPLineInput",FileHandle)
code$ = left$(response$,3)
code = val(code$)
if code < 200 or code > 299 then goto _MailToError
print "RCPT TO accepted by mail server ..."
rem Send the message
WAIT 2000
result = call dll(1,"TCPPrint",FileHandle,"DATA")
response$ = call dll(1,"TCPLineInput",FileHandle)
code$ = left$(response$,3)
code = val(code$)
if code < 200 or code > 399 then goto _DataError
rem Message Header
from$ = "From: " + name1$ + "<" + name2$ + ">"
to$ = "To: " + sendto$
subject$ = "Subject: DarkBASIC Pro Email Test"
result = call dll(1,"TCPPrint",FileHandle,from$)
result = call dll(1,"TCPPrint",FileHandle,to$)
result = call dll(1,"TCPPrint",FileHandle,subject$)
result = call dll(1,"TCPPrint",FileHandle,"X-Mailer: DarkBASIC Pro SMTP Example v1.0")
result = call dll(1,"TCPPrint",FileHandle,"")
rem Send the actual message
email2$ = call dll(2,"HIDDEN",email$)
result = call dll(1,"TCPPrint",FileHandle,email$)
rem Send the end of message command
result = call dll(1,"TCPPrint",FileHandle,".")
response$ = call dll(1,"TCPLineInput",FileHandle)
code$ = left$(response$,3)
code = val(code$)
if code < 200 or code > 299 then goto _CloseError
print "Message accepted by mail server ..."
rem Close the session with the server
result = call dll(1,"TCPPrint",FileHandle,"QUIT")
response$ = call dll(1,"TCPLineInput",FileHandle)
code$ = left$(response$,3)
code = val(code$)
if code < 200 or code > 200 then goto _QUITError
print "Session with " + mailserver$ + " has been closed - message sent!"
goto _ByeBye
_CantConnect:
print
print "Cannot connect to SMTP service on " + mailserver$
print "Result: " + response$
goto _ByeBye
_HeloError:
print
print "HELO error on " + mailserver$
print "Result: " + response$
goto _ByeBye
_MailFromError:
print
print "MAIL FROM error on " + mailserver$
print "Result: " + response$
goto _ByeBye
_MailToError:
print
print "RCPT TO error on " + mailserver$
print "Result: " + response$
goto _ByeBye
_DataError:
print code
print
print "DATA error on " + mailserver$
print "Result: " + response$
goto _ByeBye
_CloseError:
print
print "Error closing message on " + mailserver$
print "Result: " + response$
goto _ByeBye
_QUITError:
print
print "QUIT error on " + mailserver$
print "Result: " + response$
goto _ByeBye
_ByeBye:
print
print "Press ENTER to quit ..."
input "",a$
delete dll 1
autor this plugin not found, no find user.
Anxiously awaiting BlueGUI v2
it informs to me when and ended BlueGUI v2