Page Bottom  Documentation

E Mail

I've long wanted for e-mail to be easier. If I want to say

"Davin, your code works except on line 37",
why do I have to go to a clumsy e-mail client. Why can't I type in an apl session
"your code works except on line 37" qkEmail "Davin".
Now I can. Of course, I can also give it a list of 400 e-mail addresses as the right argument and it will send the message to all asynchronously (faster because the next starts before the prior one is sent). qkEmail does this with a utility built by Eric Lescasse and it is part of "Net Access Objects". The best commercial product I've found is, but it is awkward for routine use according to one user who said it is wonderful for bulk mail. Eric's Net Access Object is easy for an apl programmer to adapt for one's own way of working. One very tough issue is that many ISP's won't let e-mail sent by Eric's facility to go thru. Spam control at and don't let these e-mails go thru, only lets a few thru, but does let a bulk e-mailing go thru. Eric's facility is called NetAccess 2.0, or the OBJECTS.DLL C# 2.0 Assembly. It requires Microsoft .Net Framework 2.0 Net Access has other objects as well.
'#' •wi 'XInfo' 'Objects'
Objects.ADO ActiveObject Objects.ADO
Objects.FTP ActiveObject Objects.FTP
Objects.Mail ActiveObject Objects.Mail
Objects.TExcel ActiveObject Objects.TExcel
Objects.Web ActiveObject Objects.Web

Here are the properties of "Objects.MAIL". The first 5 properties are constant for the user. There are 3 properties you must create for each message: xTo, xSubject and xBodyHTML (or xBody). I can see occasional need for the next 9 properties. The rest I haven't had to deal with; some are probably used in Eric's demo code which I adapted.

  1. xServer - server thru which the message will be sent
  2. xFrom - sender's e-mail address
  3. xPort - the port # thru which e-mail can be sent on your computer
  4. xUser - user name by which you are identified by your server
  5. xPassword - password for use of your server
  6. xTo - vector of e-mail addresses to which the message is to be sent
  7. xSubject - subject
  8. xBodyHTML - the message composed as HTML (use xBody for plain text)
  9. xCC
  10. xBCC
  11. xAttachments
  12. xBody
  13. xError
  14. xHeaders
  15. xPriority
  16. xReadReceipt
  17. xReplyTo
  18. children
  19. class
  20. clsid
  21. data
  22. def
  23. description
  24. errorcode
  25. errormessage
  26. events
  27. instance
  28. interface
  29. links
  30. methods
  31. modified
  32. modifystop
  33. name
  34. obj
  35. opened
  36. pending
  37. progid
  38. properties
  39. self
  40. state
  41. suppress
  42. unicodebstr
  43. version

Eric adds this comment. One can send Emails from APL using CDO or a number of other techniques. I personally have 4 or 5 APL functions which can send Emails and use different techniques.

One uses CDO, uses the BLAT utility, another one uses low level sockets only, one uses the Outlook.Application object, one uses ShellExecute, etc.

However none of these APL functions is able to send Emails asynchronously and that makes a "huge" difference.

For example, I used to be sending E-mailings every 2 months to about 1000 recipients for a customer of mine with my APL functions: this used to take more than one hour. Moreover it rarely went to completion without bumping for a reason or another (not due to my programming).

Now, with my C# DLL, sending the same E-mailing to 1000 persons takes about one minute and never fails.

horizontal line
to home page e-mail Page Top