title: How to implement SMTP and IMAP in Node.js
body: <p>Node.js has built-in implementation for http protocol using the module system which aids in creating web servers.</p>
  
  <p>Does it have anything similar for the smtp and imap protocols of the e-mail?</p>
  
  <p>I already know that I can use modules such as nodemailer and whatever, but I want to learn how to do it myself and I really don't mind to reinvent the wheel as some might be pointing, but I have the curiosity to learn. Just want to know the technique I can use to do so with nodejs and its core modules.</p>
  
  <p>I don't mind linking to other sources that can help (a note that can be ignored).</p>