Implemented low-level and high-level API for sending email via SMTP