New
#1
sending / receiving emails via command line
Hi folks
I'm working on trying to send and receive emails via command line every so often on Windows
It can be done but all the faqs - imbeciles guides etc etc just seem too complex and everybody uses gmail as their mail server.
I'll do a proper tutorial later for a complete method but just to start on receive emails from a single account into one mailbox on an IMAP server (bog standard, no SLS etc) it's very simple to start receiving.
ON Windows you need to install cygwin and mutt.
now simply create the following in file .muttrc
set mbox_type = Maildir
set folder = imap://<your imap mail server address>
set imap_user = <your account to RECEIVE mail>
set imap_pass = <password on the account for inbound mail>
set spoolfile = "+INBOX"
That's it for Inbound mail
I'll do more complex stuff later also with smtp send and with TLS stuff (If your IMAP has a security type sign on then you need imaps: for the server not imap: for the inbound server.
The way I like to try stuff is forget all the complex stuff --try the bog standard easiest possible things first so the process (send / receive) works and then enhance security, add accounts etc etc.
what I'm trying to achieve is to automatically send email containing my IP address (ISP one not LAN) when it changes so I can always logon remotely to my computers at home without needing teamviewer / dyndns or whatever.
Basic receive now works : just type mutt and you'll see the screen I've got. BTW you can do this from the WSL without needing cygwin -- install mutt of course output shown below.
Note there's also an error in most guides I've looked at -- IMAP password -- correct parameter should be as I've got it -- imap_pass and NOT imap_password.
cheers
jimbo