************************************* * * * DB/C Newsletter * * February 2001 * * * ************************************* News and Comments We've moved. Our new office is in Hinsdale, Illinois. Our phone number is 630.655.2380. For complete contact information, see www.dbcsoftware.com. On June 1, 2001, the prices for upgrading from DB/C 8 and DB/C 9 to DB/C DX will increase. On December 31, 2001, the prices for upgrading from DB/C 9 to DB/C DX will increase again, and licenses of DB/C 8 will no longer be upgradeable to DB/C DX. These new upgrade prices can be found at www.dbcsoftware.com. The change to delivering DB/C software by downloading over the Internet has been very successful. In the past few months, we have shipped very few tapes and diskettes. Thus, effective immediately, we will no longer produce DB/C software on diskettes or tape. Instead, if you need DB/C software delivered to you on physical media, we will provide it on CD. The charge for providing software on CD will be $40 including shipping to the US and Canada. A shipping charge of $30 will be added for shipments outside of the US and Canada. We continue to work on DB/C FS 3. Several hardy souls are aiding us as alpha testers while we complete the major overhaul of the DB/C FS. We won't begin beta testing until we feel that the product is more mature. Hopefully, that will be in March. As we promised, this month's newsletter describes the sample DB/C code that sends an email with one or more attached files. don.wills@dbcsoftware.com ****************************************************************************** Sending Email with Attachments from DB/C DX The magic of doing TCP/IP from within your DB/C DX programs provides lots of options. Sending email with attachments is one of these options. A sample program that implements everything necessary to send an email with one or more files attached directly from a DB/C DX program is available as 'mail.prg' at 'ftp.dbcsoftware.com'. Login using FTP as user 'anonymous' and provide your email address as the password. The 'mail.prg' program can be found in the '/pub/misc/dxsample' directory. Once you've retrieved the program, you'll need to make minor changes to make it work. The first dozen lines are code that causes an example email to be sent with two attached files. Several of these first few lines will need to be changed to make the program work in your environment. The remaining 300 or so lines of 'main.prg' contain the routines that actually do the work. They should not need to be changed. The character array named 'msgtext' contains the body of the email message. The number of elements in this array must be greater than or equal to the number of lines of text in the body of the email. The indication for the end of the email body is an element of the array with string length of zero. The character array named 'attachm' contains the names of the files to be attached to the message. Again, the number of elements in this array doesn't matter. The indication that there are no more files is an element with string length zero. The mail is sent directly by the 'call sendmail' statement. There are six parameters in this call statement. The first parameter is the DNS name or IP address of the SMTP server that you use to send email. The next two parameters are the from and to email addresses. The fourth parameter is the text of the 'Subject:' in the email header. The fifth and sixth parameters are the 'msgtext' and 'attachm' arrays. The actual code that does the send uses the MIME encoding method to encode binary files so that when they are received they can be exactly reconstructed by the receiving email program. We've done basic testing of this program, but given the complexity of the bit fiddling, there may be bugs in it. If you find any, let us know so we can fix the program. ****************************************************************************** DB/C Class Schedule Class: DB/C DX and JX Language Fundamentals Date: June, 2001 Location: To be determined For information, send email to admin@dbcsoftware.com. ****************************************************************************** Subscribing to the DB/C Newsletter If you don't already have the DB/C Newsletter delivered to your email address and would like to have it emailed to you monthly, just send an email message to 'dbcnews-subscribe@dbcsoftware.com'. The newsletter will be delivered to the email address from which the message was sent.