This command line tool imports .eml files into INBOX of IMAP account.
> go get github.com/gonejack/import-mail
> import-mail --host imap.example.com --username username --password password *.eml
Flags:
-h, --help Show context-sensitive help.
--host=STRING Set IMAP host.
--port=993 Set IMAP port.
--username=STRING Set IMAP username.
--password=STRING Set IMAP password.
--remote-dir="INBOX" Set IMAP directory.
--size-limit="20M" Set size limit, mail exceed this limit will be skipped.
--about Show about.