项目作者: prashantgupta24

项目描述 :
A bulk email downloader from an IMAP server written in go
高级语言: Go
项目地址: git://github.com/prashantgupta24/bulk-email-downloader.git
创建时间: 2018-07-11T00:14:24Z
项目社区:https://github.com/prashantgupta24/bulk-email-downloader

开源协议:

下载


Bulk-email-downloader

A bulk email downloader from an IMAP server written in go. It downloads bulk emails from an IMAP server using configurable number of go-routines. It saves them in an Array called Messages.

Config

Create a .env file in the same directory as the main.go file, and fill in the following properties:

  1. IMAP_SERVER=
  2. EMAIL=
  3. PASSWORD=

2 configurations determine the number of emails read per batch, and the total number of emails to be read

Default values are:

  1. const EmailsPerBatch = 500
  2. const TotalEmails = 2000

Feel free to change them as per your specifications.

Example output

  1. go run main.go
  2. 2018/07/11 16:24:35 Connecting to server...
  3. 2018/07/11 16:24:37 Logged in
  4. 2018/07/11 16:24:37 Fetching emails from number 501:1000
  5. 2018/07/11 16:24:37 Fetching emails from number 1:500
  6. 2018/07/11 16:24:37 Fetching emails from number 1001:1500
  7. 2018/07/11 16:24:42 Logging out
  8. 2018/07/11 16:24:42 Read 1216 messages
  9. 2018/07/11 16:24:42 Time taken 6.814280051s