How to use Gmail to send a message from a SAS program

Previously I've described how you can use SAS Enterprise Guide to send an e-mail message using Gmail as your e-mail provider. In the article, I mentioned that you can also write SAS programs that send e-mail messages, but at the time you could not reach Gmail using the FILENAME EMAIL [...]