Highlighted
Absent Member.
Absent Member.
855 views

[archive] Callable VB emailing program

[Migrated content. Thread originally posted on 15 January 2004]

After many struggle of trying to translate VB codes, I figured that it would be better if we could use the VB codes as they are. So I started to learn the VB and downloaded many free VB codes what was written by many talented programmers, especially people who are maintaing the vbSendMail.dll.
Anyway, after many trial and error, I am able to call dll from cobol programs. I've created CobolVBDll.dll with two classes (hope to add more useful routines in future):
clsMail - to send mails
clsGUID - to create Globally Unique Identifier (I needed them for interfacing with one of my customer's xml Database)
I've seen many posts here where people wanted to know how to send emails via Cobol, so I decided to put together a VB dll which I can send email using SMTP, Outlook, or plain MAPI with option to add as many attachments as possible.

Since I've gotten many help from VB programmers who posted their creations in many VB forums, I've decided to share my little creation with my fellow AcuCobol users; so feel free to use them and hopfully, some of you would do the same.

Attached zip file contains:
AcuCobol.def -
AcuGui.def
CallVBDll.cbl - Example Cobol program that call the CobolVBLib.dll
CobolVBLib.def - created by axdefgen.exe for CobolVBLib.dll
test.bat - to compile CallVBDll.cbl
run.bat - to run cobol program CallVBDll.exe
CobolVBLib.dll - VB dll
vbSendMail.dll - VB dll used by CobolVBLib.dll for SMTP mail
CobolVBLib.zip - contain all related VB codes.
(i'm not a seasoned vb programmer... so be easy on me)

Added clsPrintScreen - allows to print the current active screen to the default prn device.
Hope to add more useful routines through out the year and I'll try to post them. If this is usefull, let me know...
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Callable VB emailing program

Thank you for sharing knowledge and utilites with fellow COBOLers!
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Callable VB emailing program

This zip file contains VB programs... minus the earlier path problem, I hope....

Gile, thank you for your comment.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Callable VB emailing program

Added clsFTP to COBOLVBLIB.DLL
This class will allow you to "UploadFile", "DownloadFile", "DeleteFile", and "MakeDirectory". You must supply FTPServerName, UserName, and Password. It will return -1 if successful.

It uses Microsoft Internet Transfer Control 6.0 (SP4) - msinet.oca.

Unfortunately I wasn't able to upload the VBfiles because of the size, but if you want a copy, you can email me for them.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.