Home

Topwiz Software

Anything is possible given enough time, money and Mountain Dew!

 
 
line decor
   
line decor
   
 

All examples include a PB8 and PB10 version. If you are using PB9, you can migrate the PB8 library.
Click here to download an installer for all the free code samples: WebExamples.

If you find one or more of the free code examples useful, you can pay what you want to help maintain them. Click here to make a payment.

Product Spotlight
Adapter

EmailSMTP

This program sends E-Mail using the SMTP protocol. The SMTP object inherits from my Winsock object. It supports HTML formatted messages and attachments. Attachments can be disk files or blob variables.

Images embedded within HTML messages are also supported. Just use src="cid:attach.filename" in the IMG tag where filename is the attachment it refers to.

EmailSMTP uses Cryptlib, an open source library to communicate with the server using SSL or TLS encryption. The file cl32.dll is the 32bit Cryptlib and cl64.dll is the 64bit Cryptlib. The library emailsmtp64.pbl was built in PB 12.6 and has changes to support 32bit when run from the IDE or 32bit exe and support 64bit when run from a 64bit exe. The n_winsock object is no longer autoinstatiate so you can create the proper smtp object (n_smtp or n_smtp64).

It also has optional logging to Jaguar.log so is suitable for deployment to EAServer. It also has the ability to log messages to the system Event log.

Please note that the Win API function CryptBinaryToString used to base64 encode non-text attachments requires Win XP, Win Server 2003 or later.

Also included is a sample .reg file you can use to force FindMimeFromData to recognize an oddball file extension as plain ANSI text. Just edit the file and change all occurrences of 'ext' to your file extension. If a text file is not recognized as text, it will be sent base64 encoded. This won't hurt anything but it will make the file 33% larger.

Click here to download the PowerBuilder sample: EMAILSMTP.ZIP

Win API Functions used:

CloseHandle
CreateFile
FindMimeFromData
GetTimeZoneInformation
OutputDebugString
QueryPerformanceCounter
QueryPerformanceFrequency
ReadFile
RpcStringFree
RtlMoveMemory
Sleep
UuidCreateSequential
UuidToString

Plus those in in the Winsock object

——— Last updated 03/13/2016 ———

Bitmap
BCrypt
Canvas
ChooseFont
ComCtl
ControlPanel
Cookiemgr
Cryptoapi
DisplayIcon
DWGridXP
DynamicMenus
EmailPOP3
EmailSMTP
Filesys
Filetouch
FTPClient
GetFileName
GetURL
Icontray
ImageList
Indirect
Jagman
LDAPQuery
LineCount
LineDraw
MessageBox
Mutex
Netquery
ODBC API
OSVersion
Outlook
PBChat
PBEditor
Ping
PrinterInstall
Rapi
ResizeResponse
RunAndWait
SendSMS
Splitbars
SQLAzure
Statbar
Twitter
USPS Barcode
ValidLogon
WebBrowser
WinHTTP
Winsock
Zlibwapi

PBSearch
The ultimate PowerBuilder search utility. Faster, more accurate and more capable than the built-in search tool.

PBNIServ
Do what was once impossible! Create a Windows Service program entirely in PowerBuilder without any API function calls.

WizSource
WizSource is an advanced Source Control system that is designed to be the easiest and fastest provider for PowerBuilder.