Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1449

JACMail4 with TLS 1.3

$
0
0
This version of JACMail supports TLS 1.3. This project became necessary when my ESP (Email Service Provider) decided to utilize the Gmail platform. Although a small portion of TLS 1.2 supports Forward Secrecy, TLS 1.3 was chosen because that is all it supports, thereby making it safer and easier to implement on its own (no stored keys). Please be aware that, although the JACMail program is very mature, this particular version has undergone limited testing and may contain bugs. Feedback is welcome.

Gmail & others enforce the use of TLS on their platform. They say that it makes your email more secure, but as the name (Transport Layer Security) suggests, it only protects your email during a single transport leg. Not all MTAs (Mail Transport Agents) support it, and mail is stored on the servers unencrypted. The only way to truly protect your email is end-to-end encryption, but not having access to the email contents would make spam filtering next to impossible. To be truly secure requires end-to-end encryption and enforced sender authentication. The primary purpose of TLS in this situation is to make it difficult for hackers to learn your password (difficult but not impossible).

JACMail does not support HTML directly, but offers a single click export to your default browser for viewing. Virtually all malware and most spam is distributed using HTML because HTML offers executable scripts. JACMail does support attachments and spell checking.

SMTP (Simple Mail Transport Protocol) and POP (Post Office Protocol) are two of the few protocols left that still use ASCII. However, since they now require encryption, byte arrays must be used and converted to strings where necessary.

Setting up an email account can be a bit challenging at times. To make it easier, routines have been provided to test POP3 on port 995 and SMTP on port 465. JACMail does not support port 587 (STARTTLS). For Gmail, the easiest way to begin operation is to allow less secure apps. I haven't looked into it yet, but 2FA (2 Factor Authentication) should also be possible.

JACMail uses IP Version independent Winsock2 system calls, so it will only work on Windows systems that actively support both IPv4 and IPv6. In addition, because it requires TLS 1.3, it is more or less restricted to Win 8.1 and Win 10. The following standard support files are necessary:
MSADODC.OCX
COMDLG32.OCX
MSDATGRD.OCX
Inked.dll
MSBIND.DLL
Inked.oca
msado15.dll
RICHED20.dll

The first time JACMail is run, it will look for the Access Database (JACMail4.mdb) in the current User directory (C:\Users\Username\JACMail4\). If \JACMail4\ does not exist, it will create it as well as a sub-directory called "\Attach". It will then prompt the user to copy the supplied blank database "JACMail4.org" to JACMail4.mdb. It will then create the DSN necessary to access the database.

JACMail comes with 4 tables (InBox, OutBox, Archive, & Dummy). The Dummy table is used to allow you to create different Mail Boxes that mail can be transferred to, using the Menu item "New Mailbox".

An online Help file is available by clicking on the "Online Help" menu item. Although it is for an older version, from a user's perspective it is essentially the same. The big difference is in the Setup. The image below shows some typical settings for a Gmail account.

When checking for mail, you are prompted to enter the password. This is done once per session so that you don't forget the password. Gmail requires sender authentication as well. When you enter the SMTP Password, a Base64 encoded User/Password string is saved, and that is why the Password field appears blank. Note that you don't have to use the same account for both POP3 and SMTP. I would be doing this myself, but my third party supplier does not support TLS 1.3 yet.

J.A. Coutts
Updated: 12/16/2020 with 2 bugs found by wqweto resolved
Attached Images
 
Attached Files

Viewing all articles
Browse latest Browse all 1449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>