Hi all.
I managed to get the email sending to work at some stage but it has been out of action for a while now. I need or would like to get it up again. My code is basicaly a copy of the exaple
' This function sends out an email to the address specified in the tag
' The SMTP server must be defined correctly using the Ethernet Configuration Tool
' provided by i-TRiLOGI version (6.3x or higher) software.
' ==============================================================
SETLCD 0,0,CHR$(1) ' clear LCD screen
PRINT #4 "<EMAIL alarm@secs.net.au>" ' replace with your destination email
PRINT #4 "SENDER: plc1@secs.net.au" ' should be a valid server address
PRINT #4 "SUBJECT: Your power has failed"
PRINT #4 "</>" ' end the email.
Call rdComm4
SETLCD 1,1,"Email Response Code:" +STR$(date[3]) + ":" + STR$(date[2]) + " - " + STR$(TIME[1]) + ":" + STR$(TIME[2]) + ":" + STR$(TIME[3])
SETLCD 2,1, A$
SETLCD 3,1, STR$(date[3]) + ":" + STR$(date[2]) + " - " + STR$(TIME[1]) + ":" + STR$(TIME[2]) + ":" + STR$(TIME[3])
S = status(3) ' Status(3) = 1 if successful, 0 if failed.
and the rdcomm
' This function read a CR-terminated string received from COMM1 and
' the returned string is stored in A$.
'===================================================================
FOR I = 1 to 10000
A$ = INPUT$(4)
IF LEN(A$) <> 0 RETURN: ENDIF
NEXT
but no matter what, I get an error saying
err:04-not connected
Now I can see the log file of the mail server and it shows the system trying to connect and it doesnt say its not allowed or anything. I need some ideas guys to try.
Peter