Posts

Showing posts from November, 2017

Commodore 64 Basic

Image
Well, that was a nice trip down memory lane! I have just come across the C64 Mini over at https://thec64.com . It's not being released until 2018 but it's a mini replica of the Commodore 64 with USB and HDMI ports. The Commodore 64 was my very first computer. Of course I played the games! Buggy Boy & Commando instantly spring to mind. But the cool thing about the C64 was that it booted up into the basic language! I have fond memories of typing out programs from the back of magazines only for them not to work. The result of a rouge typo somewhere! But I do remember experimenting with the basic language because the user manuals for the computer covered the BASIC language. Amazingly I have just found the manuals preserved online here . Isn't it funny that the GOTO keyword is considered harmful today in software development, but it introduced me to scrolling my name infinitely up a TV screen! 10 PRINT "Ocean Airdrop Woz Here" 20 GOTO 10 RUN Anyway, w

Reading the contents of emails in an inbox.

The .NET framework comes with a SMTP email client to send out emails in the box and is simple to use: var msg = new MailMessage("oceanairdrop@gmail.com", toList, subject, messageBody); var client = new SmtpClient(server).Send(msg); But recently, I wanted to be able to read the contents of emails in an inbox. Thats when I went searching in the framework only to find out there there is no support for IMAP in the .NET framework. That's when I found Mailkit and its awesome! Mailkit can query in inbox in all sorts of ways and works really well. That brings me to this blog post as its a mental bookmark for me if I ever need to do this kind of thing in the future. To use it, there is nuget package you can use to pull down the library and easily include it in your project: Install-Package MailKit Whats the code like? Well, here is an example of reading an inbox using the library: using (var client = new ImapClient()) { client.ServerCertificateValidationCallback =