![]() |
|
|
+ Search |
![]()
|
Feb 5th, 2006 12:42
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 05 February 2021 - 07:33 pm -------------------
BBCBASIC: Windows: Network: Socklib: E-mail: Send: How to connect to
port 25 of SMTP server?
---
Steps: Overview:
1. -Create the following program
--- cut here: begin --------------------------------------------------
host$ ="mail.yahoo.com" : REM change this possibly to the name or IP
address of your SMTP server
port$ = "25" : REM change this possibly
errorB% = FALSE
INSTALL @lib$+"SOCKLIB"
PROC_initsockets
listenI% = FN_tcpconnect( host$, port$ )
PRINT listenI%
errorB% = ( listenI% < 0 ) : REM negative value returned meaning an
error
IF errorB% PRINT "error = "; FN_socketerror
PROC_exitsockets
END
--- cut here: end ----------------------------------------------------
2. -If you run this program it will e.g. show
-5
error = 10022
===
Note:
The error code numbers can be found in the Microsoft file WINERROR.H.
===
Tested successfully on
Microsoft Windows XP Professional (service pack 2),
running BBCBASIC for Windows v5.01a
===
[help: program: BBCBASIC for Windows v5.01a or higher: search
for 'socklib']
===
Internet: see also:
---
BBCBASIC: Windows: Network: Socklib: Link: Overview: Can you give an
overview of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/39533/fid/768
----------------------------------------------------------------------