How to Send Email from Command Line Windows 11

Can You Send Email Command Win 11dow -

Download Now! Fastest Send Email from Command Line App in Win

How to Send Email from Command Line Windows 11

Send mail from command prompt Commands

  • Server Specify your e-mail server. e.g. --server smtp.mydomain.com

  • Port Smtp server port number, default is 25. e.g. gmail port: --port 465

  • From Your E-mail Address. e.g. --from myname@mydomain.com Read from text file: --from "D:\from.txt" (since version 9.04.09)

  • To specify a recipient. e.g. --to myfriend@yahoo.com Read from text file: --to "D:\to.txt" (since version 9.04.09)

  • Username Your Login username. e.g. --username myname Read from text file: --username "D:\name.txt" (since version 9.04.09)

  • Password Your Login password. e.g. --password mypassword Read from text file: --password "D:\pass.txt" (since version 9.04.09)

  • Subject E-mail Subject, which should be the short description of your e-mail content e.g. --subject "Good News" Read from text file: --subject "D:\subject.txt" (since version 9.04.09)

  • Text Body (\r\n means newline) Write the content anything you like e.g.--textBody "Hello,\r\nI'm David" or read message from local text file: --textBody "D:\message.txt" or read message from remote text file: --textBody "https://www.mydomain.com/message.txt"

  • Html Body Use HTML code to write the content. e.g. --htmlBody "Hello,\r\n I'm<b>David</b>..."

  • Attachments Add Attachments. e.g. --attachments "D:\info.doc" "D:\my pic.png"

  • CC "Cc" is an abbreviation of "Carbon Copy". If you want someone, other than the direct recipients, to see your message, set those people's e-mail addresses to the Cc field e.g. --cc "john@yahoo.com,donna@hotmail.com" Read list of CC recipients from local text file(one line one email address): --cc "D:\My Customer.txt" Read list of CC recipients from remote text file: --cc "https://www.mydomain.com/customer.txt"

  • BCC "Bcc" is an abbreviation of "Blind Carbon Copy". It works exactly like Cc, but the e-mail addresses in Bcc field are not disclosed to recipients e.g. --bcc "john@yahoo.com,donna@hotmail.com" Read list of BCC recipients from local text file(one line one email address): --bcc "D:\My Customer.txt" Read list of BCC recipients from remote text file: --bcc "https://www.mydomain.com/customer.txt"

  • SSL SSL creates a secure encrypted connection between your email client application and email server e.g. --ssl true or --ssl false, the default value is false

  • Authenticate E-mail authentication is the effort to equip messages of the e-mail transport system with enough verifiable information, so that recipients can recognize the nature of each incoming message e.g. --authenticate true or --authenticate false. the default value is false

  • Just Print (since version 9.04.09) --justPrint true to print all parameters, but not actually execute them. This is a useful feature for learning this software

  • @cmdfile Read arguments from cmdfile. e.g. SendEmail @cmdfile

  • Help Output this help message: SendEmail help

  • Version (since version 9.04.17) Output version message: SendEmail version

  • Exit (since version 9.04.17) To exit program, type "exit" at the prompt: SendEmail exit

  • Man (since version 9.04.27) Open web browser on manual page: SendEmail man

  • Home (since version 9.06.06) Open web browser on home page: SendEmail home

  • Log (since version 9.04.27) Open Email Sent log file: SendEmail log

  • Encrypt (since version 12.04.23) Encrypt username or password: SendEmail> encrypt usernameOrPassword

Sending mail from command prompt Examples:

Please Note:Parameters that include spaces must be enclosed in quotes (Except Read arguments from cmdfile)

  1. Use textBody, port 465 (\r\n means new line):

    SendEmail --textBody "Hello, \r\nI'm terry..." --server smtp.mydomain.com --port 465 --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News"

  2. Using htmlBody, ssl and authenticate:

    SendEmail --htmlBody "Hello, I'm <b>terry</b>..." --ssl true --authenticate true --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News"

  3. Read the body of the message from local text file:

    SendEmail --textBody "D:\my letter.txt" --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News"

  4. Read the body of message from remote text file:

    SendEmail --textBody "https://software-download.name/ letter.txt" --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News"

  5. More Attachments:

    SendEmail --attachments "D:\good.txt" "D:\my picuture.jpg" --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News" --textBody "hello, \r\n I'm David..."

  6. CC and BCC:

    SendEmail --cc "john@blog.com,lucy@good.com" --bcc "ailsa@news.com,donna@earth.net" --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News" --textBody "hello, \r\n I'm David..."

  7. Read CC, BCC address from file(one line one email address):

    SendEmail --cc "D:\customer.txt" --bcc "https://software-download.name/customer.txt" --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News" --textBody "hello, \r\n I'm David..."

  8. smtp.gmail.com

    SendEmail --server smtp.gmail.com --port 465 --from myname@gmail.com --to terry@yahoo.com --username myname --password mypass --subject "Good News" --textBody "hello, \r\n I'm David..." --ssl true --authenticate true

  9. smtp.mail.yahoo.com

    SendEmail --server smtp.mail.yahoo.com --port 465 --from myname@yahoo.com --to terry@yahoo.com --username myname --password mypass --subject "Good News" --textBody "hello, \r\n I'm David..." --ssl true --authenticate true

  10. Read from, to, username, password, subject from text file

    SendEmail --from "D:\from.txt" --to "D:\to.txt" --username "D:\name.txt" --password "D:\pass.txt" --subject "D:\subject.txt" --server smtp.mydomain.com --port 25 --textBody "hello, \r\n I'm David..."

  11. Just Print all parameters, but not actually execute them

    SendEmail --justPrint true --textBody "D:\my letter.txt" --server smtp.mydomain.com --from david@mydomain.com --to terry@yahoo.com --username david --password mypass --subject "Good News"

  12. Read arguments from cmdfile

    Usually, some parameters are invariant over many email sending processes. Typically settings like FROM address and name, SMTP server, character set, user name and password stays the same. In such cases it is possible to create configuration text file that includes all such invariant parameters and specify this file after @ sign, thus replacing the entire recurring part of command line

    first, create a text file contains arguments and save to software install directory, each line is identified by a line feed or carriage return and line feed combination

    Possible content of cmdfile.txt file, which is used to specify all email message parameters. Take a note on possibility to include reference to another configuration file that provides some other parameters \r\n in textBody or htmlBody will replace new line cmdfile.txt:

    --server
    smtp.mydomain.com
    --port
    25
    --from
    david@mydomain.com
    --to
    terry@yahoo.com
    --username
    david
    --password
    mypass
    --subject
    Good News
    --textBody
    hello,  \r\n I'm David.
    --ssl
    true
    --authenticate
    true
    --attachments
    D:\good.txt
    D:\my picture.jpg
    --cc
    D:\customer.txt
    --bcc
    https://software-download.name/ customer.txt
    

    second, call from any software: SendEmail @cmdfile.txt

    Or run from SendEmail> prompt: SendEmail> @cmdfile.txt

    Enclosed in quotes if path includes spaces: SendEmail> "@D:\my path\cmdfile.txt"

  13. Overwrite settings as many as your want (since version 9.05.06)

    Change the textBody setting:

    SendEmail @cmdfile.txt --textBody "hello,\r\nTest message"
    

    Change the to, bcc setting:

    SendEmail @cmdfile.txt --to friend@yahoo.com -bcc D:\bcc.txt
    
  14. Encrypt username or password (since version 12.04.23)

    Encrypt the username:

    SendEmail> encrypt myLoginName
    

    Encrypt the password:

    SendEmail> encrypt myLoginPassword
    

How to write log to the folder where the software is installed ?

There are two log files, the default one is C:\Users\YourName\AppData\Roaming\SoftwareDownload\SendEmail\log.txt(for Windows 10 64bit), the other is in the folder where the software is installed

Remove C:\Users\YourName\AppData\Roaming\SoftwareDownload\SendEmail\log.txt to write the log to software folder

How to disable log ?

Remove the two log files to disable log

Can I E Mail from Commandline Windows 11 PC