Greyware Automation Products, Inc.
    Greyware Automation Products, Inc.
Menubar Left Endcap      Home    Products    Store    Downloads    Customer Service    Search    
Menubar Right Endcap
    Log in  or   Create an account now -- FREE!
SendSMTP   
 Overview 
 Support 
 Pricing 
    Buy It           
 - Try It, FREE! - 

SendSMTP Logo

Send SMTP email directly from the command line!


Include in batch files for customized, automatic notifications!

 Overview

SendSMTP is a command-line SMTP mailer for Windows 95/98/ME/Windows NT4/2K/XP/2003/Vista/2008. It may be used in batch files or interactively.

SendSMTP is designed to be as bullet-proof and easy-to-use as possible. Send properly-formatted email on-demand!

Requirements


    Any Win32 platform machine, including Windows 95, 98, ME, NT 3.51 or NT 4.0 (Intel or Alpha), and 2K/XP/2003.

    This program requires that you have TCP/IP installed and properly configured on your machine. If your SMTP host is not on your local network (say, for example, that you use a dial-up connection to the Internet for email), then you must go online and establish your PPP or SLIP session before running SendSMTP.

Setup and Installation


    SendSMTP is a command-line utility. It has no components other than the main executable file, and requires no configuration or setup. All parameters that SendSMTP needs are passed on the command line when you use it. SendSMTP does store your defaults (set the first time you run the program) in the system registry.

Version History


  • 1.4.b.20030826 - fixed bug that could cause partial duplication of text when sending an non-encoded text file without a message (i.e., text from file streamed into the body of the email).

  • 1.4.b.20021119 - added cc, bcc, port, username, and password options.

  • 1.3.b.20011003 - added datetime stamp to accommodate SMTP servers that don't add the date header if not present. No other changes.

  • 1.3.b.20000305 - added expansion of environment strings within messages (for example, %computername% or %username%).
  • 1.3.b.19991205 - removed surplus CRLF after sending data; this confused some severs.
  • 1.3.b.19990831 - fixed bug that kept the /quiet switch from working correctly.
  • 1.3.b.19990624 - increased max size of message to 128k; added support for non-cannonical email addresses; added support for reading parameters from a parm file instead of the command line.
  • 1.2.b.19990510 - minor internal enhancements to error handling and memory allocation
  • 1.1.b.19970522 - alpha version available
  • 1.1.b.19970522 - fixed bug that sometimes caused the first part of short text messages to show up twice when sent with the file= option.
  • 1.1.b.19970520 - added support for reply-to and errors-to headers; added - /quiet switch.
  • 1.1.b.19970301 - first public release.
  • 1.0.b.19970203 - added support for encode= parameter; first public beta.
  • 1.0.b.19960713 - added support for file= parameter.
  • 1.0.b.19960203 - internal use release. Basic functionality established.

Notes


    Most parameters for SendSMTP are entered via the command line in name=value format. (The exceptions are /quiet (may also be -quiet), which suppresses all non-error messages, and @parmfilename, which specifies a file to use for the rest of the parameters.)

    Command-line parameters may be specified in any order. Parameters including spaces or other special characters must be enclosed in double quotation marks.

    • @parmfilename
      New in version 1.3. If specified, this must be the only parameter on the command line. Replace parmfilename with the fully-qualified filename of a file containing the rest of the parameters. Here is a sample parmfile.

    • To
      Specifies the recipient. Example: to=gatesb@microsoft.com
      Separate multiple recipients with a comma. Example: to=fred@flintstone.org,wilma@flintstone.org

    • CC (optional)
      Specifies additional recipients. Example: cc=gatesb@microsoft.com
      Separate multiple recipients with a comma. Example: cc=fred@flintstone.org,wilma@flintstone.org

    • BCC (optional)
      Specifies blind-copy recipients. Example: bcc=gatesb@microsoft.com
      Separate multiple recipients with a comma. Example: bcc=fred@flintstone.org,wilma@flintstone.org

    • Port (optional)
      Specifies SMTP port. If not supplied, the default SMTP port 25 will be used. Example: port=2525

    • Subject (May be abbreviated to Sub or Subj)
      Specifies the subject line. Example: subject="This is a test message"

    • Host
      Specifies the name or IP number of your SMTP host. Example: host=sendmail.mydomain.com or host=199.199.32.78

    • From
      Specifies the name of the sender. Example: from=me@mydomain.com

    • ErrorsTo
      Optional; defaults to same as From. Specifies the return address used for error messages. Note: many email clients and mailing lists ignore this header. Example: errorsto=postmaster@mydomain.com

    • ReplyTo
      Optional; defaults to same as From. Specifies the return address if different from the From address for some reason. Note: many email clients and mailing lists ignore this header. Example: replyto=postmaster@mydomain.com

    • Message (May be abbreviated as Msg)
      Specifies a text message to send (instead of a file). Use either message= or file=, but not both. Example: message="This is my message."

    • File
      Specifies a file to send (instead of a text message). Use either file= or message=, but not both. Long filenames and UNC names are acceptable. Examples:
      • file=c:\filetosend.txt
      • file="c:\my documents\long file name.doc" (note the quotation marks!)
      • file=\\server\share\path\filename.exe

    • Encoding (May be abbreviated as Encode or Enc)
      Specifies an encoding method to use. The value may be TEXT, MIME, or UUENCODE. If left off, SendSMTP will attempt to determine whether or not the file is binary. If it appears to be text, SendSMTP sends it as plain text, without any encoding. If it appears to be binary, SendSMTP sends it as UUENCODE. If you specify this parameter, it overrides SendSMTP's decision and sends the file in the format you select. Examples:
      • encoding=m   or   encoding=MIME (selects Base64 MIME encoding)
      • encoding=t   or   encoding=TEXT (selects no encoding)
      • encoding=u   or   encoding=UUENCODE (selects UUENCODE)
    • Username (optional)
      Specifies the username for SMTP authentication. Both username and password must be supplied if you want to use authentication. Only the AUTH PLAIN mechanism is supported. Example: username=fred

    • Password (optional)
      Specifies the password for SMTP authentication. Both username and password must be supplied if you want to use authentication. Only the AUTH PLAIN mechanism is supported. Example: password=flintstone

Defaults


    The very first time you run SendSMTP, the program uses the parameters for the SMTP host, the return address, and the subject as defaults thereafter. This means that, in ordinary use, after specifying your host name, your return address, and the subject line once, you never need to include these three parameters again (unless, of course, you want to override them).
    • If you leave the host parameter off, it defaults to 127.0.0.1. Unless you are running a sendmail daemon on your workstation, this is probably the wrong address.
    • If you leave the from parameter off, it defaults to postmaster. This is joined with whatever you entered for the host parameter to form a complete return address. Thus, if you leave both parameters blank, your return address will be postmaster@127.0.0.1. Again, this is probably not what you'll want.
    • If you leave the subject parameter off, it defaults to "Command Line Mail." This may or may not be what you want for a default.
    SendSMTP stores its configuration parameters in the registry. You may use regedt32.exe to change the defaults after they have been set.
    
        HKEY_LOCAL_MACHINE
            Software
                Greyware
                    SendSMTP
                        Parameters
    
    

Examples


    Let's say your email address is lady@hawke.dom and that your SMTP host is sendmail.hawke.dom. Run SendSMTP once to configure it with your defaults:

            sendsmtp host=sendmail.hawke.dom from=lady@hawke.dom to=lord@hawke.dom message="This is a test."

    This sends a letter, from lady@hawke.dom to lord@hawke.dom, using the SMTP host called sendmail.hawke.dom. The letter consists of the words "This is a test," and the subject (since you didn't specify one) will be "Command Line Mail."

    Since this is the first time you have run the program, SendSMTP remembers the values for the host and your email address. You don't need to enter them again unless you want to override the defaults. For example, you may now type just

            sendsmtp to=lord@hawke.dom message="This is another test" subject="Second Test"

    and SendSMTP will remember that your host is sendmail.hawke.dom and that you are lady@hawke.dom. This will send the message "This is another test" with the subject line "Second Test" to lord@hawke.dom. Notice that by specifying a subject, you can override the default. (To change the default permanently, use regedt32.exe to edit the registry as shown above.)


    Using a Parmfile
    Instead of specifying all of the parameters on the command line, you may put them into a file and tell SendSMTP to use that file. This is useful if you want to send long messages, use non-cannonical email addresses, or include line breaks in your message text.

    For example, if your parmfile is named c:\myparmfile.txt, you'd invoke SendSMTP with SendSMTP @c:\myparmfile.txt.

    Here is a sample parm file showing all the available options.


    Sending Files
    To send your config.sys to jjohng@microsoft.com, type

            sendsmtp to=jjohng@microsoft.com file=c:\config.sys

    This sends your c:\config.sys file in plain text to a user called jjohng at Microsoft (used for example purposes only). The file wasn't encoded because (a) you didn't specify an encoding format, and (b) the file is plain text. Had the file been binary, SendSMTP would have UUEncoded it for you.

    To force the config.sys file to be encoded using Base64 MIME format, type

            sendsmtp to=jjohng@microsoft.com file=c:\config.sys encoding=mime

    This sends the same file as above, but forces SendSMTP to encode it using Base64 MIME.

    Here are some more examples, showing most of the options. Notice that the order of the parameters is irrelevant. Any parameters left off use the defaults:

    • sendsmtp to=someone@someplace.com file=c:\winnt35\system32\regedt32.exe sub="Here's RegEdit" from=anon@nowhere.dom enc=uuencode
    • sendsmtp to=someone@someplace.com message="Yo, dude!"
    • sendsmtp to=someone@someplace.com file=c:\config.sys subject="Help! My config.sys is broken!"


    Shortcuts
    For quick notes, you can just type

            sendsmtp someone@somewhere.com "This is a quick note"

    SendSMTP is smart enough to figure out that if you provide only two parameters without any keywords, that the first parameter is the recipient, and the second is your message. It will use your defaults (as set the first time you run the program) for the host, from, and subject parameters.

    You may also enter a message interactively. To use the defaults, just enter

            sendsmtp someone@somewhere.com
            or
            sendsmtp to=someone@somewhere.com

    If SendSMTP sees only a to= keyword, or if you have exactly one parameter without any keywords, it will use the first parameter as the recipient and prompt you to enter your message text from the keyboard.

    To specify other settings and still use the keyboard for interactive typing, specify file=con or file=stdin.

ArrowSee our complete catalog of software...             
Menubar Left Endcap      Home      Top of this Page      Store      Downloads       Printer-Friendly Version      Menubar Right Endcap
 
Copyright © 1995-2008 Greyware Automation Products, Inc.  All Rights Reserved
All Trademarks mentioned are the properties of their respective owners.
Privacy Policy ]   [ Contact Greyware ]   [ Feedback to Greyware ]