Windows 10: sending / receiving emails via command line

Discus and support sending / receiving emails via command line in Browsers and Email to solve the problem; 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... Discussion in 'Browsers and Email' started by jimbo45, Dec 30, 2019.

  1. jimbo45 Win User

    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.



    sending / receiving emails via command line [​IMG]


    cheers
    jimbo

    :)
     
    jimbo45, Dec 30, 2019
    #1
  2. FreeBooter, Dec 30, 2019
    #2
  3. jimbo45 Win User
    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.



    sending / receiving emails via command line [​IMG]


    cheers
    jimbo
     
    jimbo45, Dec 30, 2019
    #3
  4. jimbo45 Win User

    sending / receiving emails via command line

    sending / receiving emails via command line

    Hi there
    @margrave55 works fine on WSL.


    easy via netcat

    Had it with teamviewer - how to make them unnecessary

    if you copy the text from (Windows Forum) get it into unix format ( install package dos2unix) and simply run dos2unix <filename>

    Works a treat -- no mail servers or anything needed --if you need auth servers / ssl / tls I need to modify the script but the base works fine on a normal ISP mail server on port 25
    crontab this so it sends email every so often and then wag 2 fingers at Teamviewer !!!!!

    Cheers
    jimbo
     
    jimbo45, Dec 30, 2019
    #4
Thema:

sending / receiving emails via command line

Loading...
  1. sending / receiving emails via command line - Similar Threads - sending receiving emails

  2. help receiving and sending emails

    in Windows 10 Software and Apps
    help receiving and sending emails: help with receiving and sending emails https://answers.microsoft.com/en-us/windows/forum/all/help-receiving-and-sending-emails/1f71db28-6637-437e-be4a-1ad54bf93049
  3. How to manually send stop codes via CMD command line?

    in Windows 10 Gaming
    How to manually send stop codes via CMD command line?: I Understand that you can trigger BSOD by creating a registry entry that causes a crash by pressing Right Control and scroll lock. And I know that you can also crash the system by typing "wininit" into powershell, or killing the svchost.exe program via task manager. However I...
  4. How to manually send stop codes via CMD command line?

    in Windows 10 Software and Apps
    How to manually send stop codes via CMD command line?: I Understand that you can trigger BSOD by creating a registry entry that causes a crash by pressing Right Control and scroll lock. And I know that you can also crash the system by typing "wininit" into powershell, or killing the svchost.exe program via task manager. However I...
  5. How to manually send stop codes via CMD command line?

    in Windows 10 BSOD Crashes and Debugging
    How to manually send stop codes via CMD command line?: I Understand that you can trigger BSOD by creating a registry entry that causes a crash by pressing Right Control and scroll lock. And I know that you can also crash the system by typing "wininit" into powershell, or killing the svchost.exe program via task manager. However I...
  6. Email sending and receiving issue

    in Windows 10 Network and Sharing
    Email sending and receiving issue: "I got windows 10 and use micro soft edge. I have email through google. I am unable to send emails and a long delay getting new emails loaded. WINDOWS" https://answers.microsoft.com/en-us/windows/forum/all/email-sending-and-receiving-issue/e89847da-c476-4a51-8521-60aaf27286a2
  7. Can't receive or send emails

    in Windows 10 Customization
    Can't receive or send emails: Ever since an "Update" on August 7, 2020, I cannot receive or send emails on my Windows 10 computer with Windows Live Email. https://answers.microsoft.com/en-us/windows/forum/all/cant-receive-or-send-emails/b785d8d0-8379-4d7c-908f-4e3b8832b64a
  8. sending / receiving emails via command line

    in Windows 10 Software and Apps
    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...
  9. Cannot send or receive email

    in Windows 10 BSOD Crashes and Debugging
    Cannot send or receive email: I cannot access/use by Comcast email account. Outlook doesn't work either. icloud does not work. The 'Sync' function does not respond. I can connect to the internet (WiFi). Life was fine up to three days ago - I was typing a reply to an email, unintentionally hit a bunch of...
  10. Run a scheduled task via command line via command line

    in Windows 10 Support
    Run a scheduled task via command line via command line: i want start a Run a scheduled task via command line like this: Code: %SystemRoot%\system32\taskschd.msc /Run /TN "RegIdleBackup" when i run the cmd in the prompt as admin the shedular task GUI pop up but the task not start. Is there a solution? Is the...

Users found this page by searching for:

  1. windows 10 receive email from command line

    ,
  2. sending emails automatically from a command line