E-mail
E-mail

E-mail

ZBI can be used to enhance the printer’s ability to send status via e-mail messages. The process is simple: open the email port "EML", send the recipient list, send the header, and send the body of the message.
The printer can only process a limited number of outgoing email messages at one time. For this reason, error handling should be used when opening the connection to wait for the printer to be ready to send the message. The EOT character is important for delimiting sections of the email message. If it is left out, the message will not be sent properly.
Before the following code will work, the email settings for the print server must be set up. Consult the print server manual to learn how to configure the unit.
Example
Here is an example of how to send e-mails:
1 REM EOT$ this is used to denote end of transmission 5 LET EOT$ = CHR$(4) 1 REM Open a connection to the e-mail port and if it errors 1 REM try again until complete 10 OPEN #1: NAME "EML" 15 ON ERROR GOTO 10 1 REM Specify address to send message to then end signal end 1 REM of recipients with EOT$ 1 REM To send to multiple addressees separate addressees by 1 REM space 20 PRINT #1: "youraddress@yourdomain.com";EOT$; 1 REM Fill in the message information 30 PRINT #1: "From: HAL" 40 PRINT #1: "To: Dave" 50 PRINT #1: "Subject: A message from HAL" 60 PRINT #1: "" 70 PRINT #1: "Dave, I am sorry I can not let you do that." 80 PRINT #1: i 1 REM Terminate message 90 PRINT #1: "";EOT$ 1 REM You must close the port, each open port is only good 1 REM for sending one message 100 CLOSE #1